diff --git a/classpath/java/io/ByteArrayOutputStream.java b/classpath/java/io/ByteArrayOutputStream.java index 3f6d3fdc0f..8c74d091f6 100644 --- a/classpath/java/io/ByteArrayOutputStream.java +++ b/classpath/java/io/ByteArrayOutputStream.java @@ -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; } }