diff options
Diffstat (limited to 'libjava/java')
-rw-r--r-- | libjava/java/nio/ByteBuffer.java | 9 | ||||
-rw-r--r-- | libjava/java/nio/CharBuffer.java | 5 |
2 files changed, 12 insertions, 2 deletions
diff --git a/libjava/java/nio/ByteBuffer.java b/libjava/java/nio/ByteBuffer.java index 8b7c601..d55ae6d 100644 --- a/libjava/java/nio/ByteBuffer.java +++ b/libjava/java/nio/ByteBuffer.java @@ -247,6 +247,15 @@ public abstract class ByteBuffer extends Buffer implements Comparable } /** + * Returns the current hash code of this buffer. + */ + public int hashCode() + { + // FIXME: Check what SUN calcs here + return super.hashCode(); + } + + /** * Tells whether or not this buffer is equal to another object. */ public boolean equals (Object obj) diff --git a/libjava/java/nio/CharBuffer.java b/libjava/java/nio/CharBuffer.java index e299602..e5b31b4 100644 --- a/libjava/java/nio/CharBuffer.java +++ b/libjava/java/nio/CharBuffer.java @@ -45,6 +45,7 @@ import gnu.java.nio.CharBufferImpl; public abstract class CharBuffer extends Buffer implements Comparable, CharSequence { + protected int array_offset = 0; protected char [] backing_buffer; /** @@ -201,7 +202,7 @@ public abstract class CharBuffer extends Buffer } /** - * Tells wether this is buffer is backed by an array or not. + * Tells wether this is buffer is backed by an accessible array or not. */ public final boolean hasArray () { @@ -242,7 +243,7 @@ public abstract class CharBuffer extends Buffer if (isReadOnly ()) throw new ReadOnlyBufferException (); - return 0; + return array_offset; } /** |