From 958d39aa03982d22f5d5cfa7eec9d2788551d4c8 Mon Sep 17 00:00:00 2001 From: Eric Scharff Date: Tue, 30 Oct 2007 14:55:00 -0600 Subject: [PATCH] Add debug information for ByteBuffer --- classpath/java/nio/ByteBuffer.java | 4 ++++ 1 file changed, 4 insertions(+) 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() + ")"; + } }