diff --git a/classpath/java/nio/ByteBuffer.java b/classpath/java/nio/ByteBuffer.java index 79517343ab..1b72d70b2a 100644 --- a/classpath/java/nio/ByteBuffer.java +++ b/classpath/java/nio/ByteBuffer.java @@ -134,6 +134,8 @@ public class ByteBuffer { } public ByteBuffer flip() { + limit = position; + position = 0; return this; }