* gnu/java/nio/ByteBufferImpl.java
(ByteBufferImpl): Renamed two variables.
* gnu/java/nio/CharBufferImpl.java
(CharBufferImpl): Renamed two variables.
* gnu/java/nio/DoubleBufferImpl.java
(DoubleBufferImpl): Renamed two variables.
* gnu/java/nio/FloatBufferImpl.java
(FloatBufferImpl): Renamed two variables.
* gnu/java/nio/IntBufferImpl.java
(IntBufferImpl): Renamed two variables.
* gnu/java/nio/LongBufferImpl.java
(LongBufferImpl): Renamed two variables.
* gnu/java/nio/ShortBufferImpl.java
(ShortBufferImpl): Renamed two variables.
* java/nio/CharBuffer.java
(wrap): Fixed arguments to CharBufferImpl constructor.
(hasArray): Only not read-only buffers have backing arrays.
(length): Documentation added.
(subSequence): Documentation added.
* java/nio/DoubleBuffer.java
(hasArray): Only not read-only buffers have backing arrays.
* java/nio/FloatBuffer.java
(hasArray): Only not read-only buffers have backing arrays.
* java/nio/IntBuffer.java
(hasArray): Only not read-only buffers have backing arrays.
* java/nio/LongBuffer.java
(hasArray): Only not read-only buffers have backing arrays.
* java/nio/ShortBuffer.java
(hasArray): Only not read-only buffers have backing arrays.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63101
138bc75d-0d04-0410-961f-
82ee72b054a4
2003-02-19 Michael Koch <konqueror@gmx.de>
+ * gnu/java/nio/ByteBufferImpl.java
+ (ByteBufferImpl): Renamed two variables.
+ * gnu/java/nio/CharBufferImpl.java
+ (CharBufferImpl): Renamed two variables.
+ * gnu/java/nio/DoubleBufferImpl.java
+ (DoubleBufferImpl): Renamed two variables.
+ * gnu/java/nio/FloatBufferImpl.java
+ (FloatBufferImpl): Renamed two variables.
+ * gnu/java/nio/IntBufferImpl.java
+ (IntBufferImpl): Renamed two variables.
+ * gnu/java/nio/LongBufferImpl.java
+ (LongBufferImpl): Renamed two variables.
+ * gnu/java/nio/ShortBufferImpl.java
+ (ShortBufferImpl): Renamed two variables.
+ * java/nio/CharBuffer.java
+ (wrap): Fixed arguments to CharBufferImpl constructor.
+ (hasArray): Only not read-only buffers have backing arrays.
+ (length): Documentation added.
+ (subSequence): Documentation added.
+ * java/nio/DoubleBuffer.java
+ (hasArray): Only not read-only buffers have backing arrays.
+ * java/nio/FloatBuffer.java
+ (hasArray): Only not read-only buffers have backing arrays.
+ * java/nio/IntBuffer.java
+ (hasArray): Only not read-only buffers have backing arrays.
+ * java/nio/LongBuffer.java
+ (hasArray): Only not read-only buffers have backing arrays.
+ * java/nio/ShortBuffer.java
+ (hasArray): Only not read-only buffers have backing arrays.
+
+2003-02-19 Michael Koch <konqueror@gmx.de>
+
* javax/accessibility/AccessibleContext.java
(ACCESSIBLE_DESCRIPTION_PROPERTY): Fixed typo.
readOnly = false;
}
- public ByteBufferImpl (byte[] array, int off, int lim)
+ public ByteBufferImpl (byte[] array, int offset, int length)
{
- super (array.length, lim, off, 0);
+ super (array.length, length, offset, 0);
this.backing_buffer = array;
readOnly = false;
}
readOnly = false;
}
- public CharBufferImpl(char[] array, int off, int lim)
+ public CharBufferImpl(char[] array, int offset, int length)
{
- super (array.length, lim, off, 0);
+ super (array.length, length, offset, 0);
this.backing_buffer = array;
readOnly = false;
}
readOnly = false;
}
- public DoubleBufferImpl(double[] array, int off, int lim)
+ public DoubleBufferImpl(double[] array, int offset, int length)
{
- super (array.length, lim, off, 0);
+ super (array.length, length, offset, 0);
this.backing_buffer = array;
readOnly = false;
}
readOnly = false;
}
- public FloatBufferImpl(float[] array, int off, int lim)
+ public FloatBufferImpl(float[] array, int offset, int length)
{
- super (array.length, lim, off, 0);
+ super (array.length, length, offset, 0);
this.backing_buffer = array;
readOnly = false;
}
readOnly = false;
}
- public IntBufferImpl(int[] array, int off, int lim)
+ public IntBufferImpl(int[] array, int offset, int length)
{
- super (array.length, lim, off, 0);
+ super (array.length, length, offset, 0);
this.backing_buffer = array;
readOnly = false;
}
readOnly = false;
}
- public LongBufferImpl(long[] array, int off, int lim)
+ public LongBufferImpl(long[] array, int offset, int length)
{
- super (array.length, lim, off, 0);
+ super (array.length, length, offset, 0);
this.backing_buffer = array;
readOnly = false;
}
readOnly = false;
}
- public ShortBufferImpl(short[] array, int off, int lim)
+ public ShortBufferImpl(short[] array, int offset, int length)
{
- super (array.length, lim, off, 0);
+ super (array.length, length, offset, 0);
this.backing_buffer = array;
readOnly = false;
}
*/
final public static CharBuffer wrap (char[] array, int offset, int length)
{
- return new CharBufferImpl (array, offset, offset + length);
+ return new CharBufferImpl (array, offset, length);
}
/**
*/
public final boolean hasArray ()
{
- return backing_buffer != null;
+ return (backing_buffer != null
+ && ! isReadOnly ());
}
/**
return new String (array (), position (), length ());
}
+ /**
+ * Returns the length of the remaining chars in this buffer.
+ */
public final int length ()
{
return remaining ();
public abstract ByteOrder order ();
/**
+ * Creates a new character buffer that represents the specified subsequence
+ * of this buffer, relative to the current position.
+ *
* @exception IndexOutOfBoundsException If the preconditions on start and
* end do not hold.
*/
public final boolean hasArray()
{
- return (backing_buffer != null);
+ return (backing_buffer != null
+ && !isReadOnly ());
}
public final double[] array()
public final boolean hasArray()
{
- return (backing_buffer != null);
+ return (backing_buffer != null
+ && !isReadOnly ());
}
public final float[] array()
public final boolean hasArray()
{
- return (backing_buffer != null);
+ return (backing_buffer != null
+ && !isReadOnly ());
}
public final int[] array()
public final boolean hasArray()
{
- return (backing_buffer != null);
+ return (backing_buffer != null
+ && !isReadOnly ());
}
public final long[] array()
public final boolean hasArray()
{
- return (backing_buffer != null);
+ return (backing_buffer != null
+ && !isReadOnly ());
}
public final short[] array()