fix return value of ByteArrayOutputStream.size()

This commit is contained in:
Joel Dice 2007-11-27 16:59:49 -07:00
parent 5b6a63cbca
commit d24b633665

View File

@ -15,7 +15,7 @@ public class ByteArrayOutputStream extends OutputStream {
}
public int size() {
return position;
return length;
}
public void write(int c) {
@ -65,7 +65,6 @@ public class ByteArrayOutputStream extends OutputStream {
buffer = null;
position = 0;
chain = new Cell(b, 0, p, chain);
length -= p;
}
}