mirror of
https://github.com/gcc-mirror/gcc.git
synced 2026-05-06 23:25:24 +02:00
2003-03-11 Michael Koch <konqueror@gmx.de>
* gnu/java/nio/ByteBufferImpl.java (putInt): Use limit() instead of limit. * gnu/java/nio/CharBufferImpl.java (slice): Fixed implementation. (subSequence): Better bounds checking. * gnu/java/nio/MappedByteFileBuffer.java: Import all needed classes directly. * java/nio/ByteBuffer.java (hashCode): New dummy method. * java/nio/CharBuffer.java (array_offset): New member variable. (hasArray): Fixed documentation. (arrayOffset): Return array_offset. From-SVN: r64165
This commit is contained in:
committed by
Michael Koch
parent
37bd08f8df
commit
b772d2f592
@@ -246,6 +246,15 @@ public abstract class ByteBuffer extends Buffer implements Comparable
|
||||
return offset;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user