From 194ea9ced6f547f5a6922ff9ac1dfb895262f1a2 Mon Sep 17 00:00:00 2001 From: Michael Koch Date: Tue, 11 Feb 2003 09:44:57 +0000 Subject: 2003-02-11 Michael Koch * gnu/java/nio/natCharBufferImpl.cc (nio_cast): Removed. (nio_put_*): Removed. (nio_get_*): Removed. * gnu/java/nio/natDoubleBufferImpl.cc (nio_cast): Removed. (nio_put_*): Removed. (nio_get_*): Removed. * gnu/java/nio/natFloatBufferImpl.cc (nio_cast): Removed. (nio_put_*): Removed. (nio_get_*): Removed. * gnu/java/nio/natIntBufferImpl.cc (nio_cast): Removed. (nio_put_*): Removed. (nio_get_*): Removed. * gnu/java/nio/natLongBufferImpl.cc (nio_cast): Removed. (nio_put_*): Removed. (nio_get_*): Removed. * gnu/java/nio/natShortBufferImpl.cc (nio_cast): Removed. (nio_put_*): Removed. (nio_get_*): Removed. * gnu/java/nio/SelectorProviderImpl.java (openDatagramChannel): Throws IOException. (openPipe): Throws IOException. (openSelector): Throws IOException. (openServerSocketChannel): Throws IOException. (openSocketChannel): Throws IOException. * gnu/java/nio/ServerSocketChannelImpl.java (ServerSocketChannelImpl): Throws IOException. (implCloseSelectableChannel): Throws IOException. (implConfigureBlocking): Throws IOException. * java/nio/ByteBuffer.java (readOnly): Removed. (hasArray): Use isReadOnly() instead of readOnly. (array): Use isReadOnly() instead of readOnly. (arrayOffset): Use isReadOnly() instead of readOnly. * java/nio/CharBuffer.java (CharBuffer): Implements Cloneable and CharSequence. From-SVN: r62688 --- libjava/java/nio/ByteBuffer.java | 7 +++---- libjava/java/nio/CharBuffer.java | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'libjava/java') diff --git a/libjava/java/nio/ByteBuffer.java b/libjava/java/nio/ByteBuffer.java index 380e6c6..b46b320 100644 --- a/libjava/java/nio/ByteBuffer.java +++ b/libjava/java/nio/ByteBuffer.java @@ -43,7 +43,6 @@ package java.nio; public abstract class ByteBuffer extends Buffer implements Comparable { int offset; - boolean readOnly; byte[] backing_buffer; /** @@ -156,7 +155,7 @@ public abstract class ByteBuffer extends Buffer implements Comparable public final boolean hasArray () { return (backing_buffer != null - && !readOnly); + && !isReadOnly ()); } /** @@ -172,7 +171,7 @@ public abstract class ByteBuffer extends Buffer implements Comparable if (backing_buffer == null) throw new UnsupportedOperationException (); - if (readOnly) + if (isReadOnly ()) throw new ReadOnlyBufferException (); return backing_buffer; @@ -192,7 +191,7 @@ public abstract class ByteBuffer extends Buffer implements Comparable if (backing_buffer == null) throw new UnsupportedOperationException (); - if (readOnly) + if (isReadOnly ()) throw new ReadOnlyBufferException (); return offset; diff --git a/libjava/java/nio/CharBuffer.java b/libjava/java/nio/CharBuffer.java index 0e61302..34aedeb 100644 --- a/libjava/java/nio/CharBuffer.java +++ b/libjava/java/nio/CharBuffer.java @@ -38,6 +38,7 @@ exception statement from your version. */ package java.nio; public abstract class CharBuffer extends Buffer + implements Cloneable, CharSequence { private ByteOrder endian = ByteOrder.BIG_ENDIAN; -- cgit v1.1