diff --git a/classpath/java/nio/ByteBuffer.java b/classpath/java/nio/ByteBuffer.java index 38cd1993f6..9aed90f5b5 100644 --- a/classpath/java/nio/ByteBuffer.java +++ b/classpath/java/nio/ByteBuffer.java @@ -201,4 +201,8 @@ public class ByteBuffer { if (position < 0 || position+amount > limit) throw new IndexOutOfBoundsException(); } + + public String toString() { + return "(ByteBuffer with array: " + array + " arrayOffset: " + arrayOffset + " position: " + position + " remaining; " + remaining() + ")"; + } }