add ByteArrayOutputStream.size()

This commit is contained in:
Joel Dice 2007-11-27 10:30:55 -07:00
parent 6ac124f2fb
commit 74235ea33c

View File

@ -14,6 +14,10 @@ public class ByteArrayOutputStream extends OutputStream {
this(0); this(0);
} }
public int size() {
return position;
}
public void write(int c) { public void write(int c) {
if (buffer == null) { if (buffer == null) {
buffer = new byte[BufferSize]; buffer = new byte[BufferSize];