2003-02-13 Michael Koch <konqueror@gmx.de>

* java/nio/ByteBuffer.java
	(endian): New member variable.
	(get): New methods.
	(equals): New method.
	(compareTo): New method.
	(order): New methods.
	(compact): New method.
	(isDirect): New method.
	(slice): New method.
	(duplicate): New method.
	(asReadOnlyBuffer): New method.
	(asCharBuffer): New method.
	(asDoubleBuffer): New method.
	(asFloatBuffer): New method.
	(asIntBuffer): New method.
	(asLongBuffer): New method.
	(asShortBuffer): New method.
	(get*): New methods.
	(put*): New methods.
	(toString): New method.
	* java/nio/CharBuffer.java
	(CharBuffer): Implement Comparable instead of Cloneable.
	(get): May not be final.
	(put): May not be final.

From-SVN: r62836
This commit is contained in:
Michael Koch
2003-02-13 11:37:10 +00:00
committed by Michael Koch
parent 4cce66c3d7
commit 8c9c9dfb8f
3 changed files with 428 additions and 6 deletions
+5 -5
View File
@@ -43,7 +43,7 @@ import gnu.java.nio.CharBufferImpl;
* @since 1.4
*/
public abstract class CharBuffer extends Buffer
implements Cloneable, CharSequence
implements Comparable, CharSequence
{
protected char [] backing_buffer;
@@ -119,7 +119,7 @@ public abstract class CharBuffer extends Buffer
* @exception IndexOutOfBoundsException If the preconditions on the offset
* and length parameters do not hold
*/
final public CharBuffer get (char[] dst, int offset, int length)
public CharBuffer get (char[] dst, int offset, int length)
{
for (int i = offset; i < offset + length; i++)
{
@@ -135,7 +135,7 @@ public abstract class CharBuffer extends Buffer
* @exception BufferUnderflowException If there are fewer than length
* characters remaining in this buffer.
*/
final public CharBuffer get (char[] dst)
public CharBuffer get (char[] dst)
{
return get (dst, 0, dst.length);
}
@@ -146,7 +146,7 @@ public abstract class CharBuffer extends Buffer
* @exception IllegalArgumentException If the source buffer is this buffer.
* @exception ReadOnlyBufferException If this buffer is read-only.
*/
final public CharBuffer put (CharBuffer src)
public CharBuffer put (CharBuffer src)
{
if (src == this)
throw new IllegalArgumentException ();
@@ -168,7 +168,7 @@ public abstract class CharBuffer extends Buffer
* and length parameters do not hold
* @exception ReadOnlyBufferException If this buffer is read-only.
*/
final public CharBuffer put (char[] src, int offset, int length)
public CharBuffer put (char[] src, int offset, int length)
{
if (offset < 0
|| offset >= src.length