diff options
author | mkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-02-19 11:47:49 +0000 |
---|---|---|
committer | mkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-02-19 11:47:49 +0000 |
commit | 9bb33ef99b56773e1ee7c0d76ffe03139dfaf5bd (patch) | |
tree | 89374761a0db0658f60d58f57cc6fc3b800f4ff1 /libjava | |
parent | 901ab687226474063370792e1e4314de7ba4cb2c (diff) | |
download | gcc-9bb33ef99b56773e1ee7c0d76ffe03139dfaf5bd.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63101 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/ChangeLog | 32 | ||||
-rw-r--r-- | libjava/gnu/java/nio/ByteBufferImpl.java | 4 | ||||
-rw-r--r-- | libjava/gnu/java/nio/CharBufferImpl.java | 4 | ||||
-rw-r--r-- | libjava/gnu/java/nio/DoubleBufferImpl.java | 4 | ||||
-rw-r--r-- | libjava/gnu/java/nio/FloatBufferImpl.java | 4 | ||||
-rw-r--r-- | libjava/gnu/java/nio/IntBufferImpl.java | 4 | ||||
-rw-r--r-- | libjava/gnu/java/nio/LongBufferImpl.java | 4 | ||||
-rw-r--r-- | libjava/gnu/java/nio/ShortBufferImpl.java | 4 | ||||
-rw-r--r-- | libjava/java/nio/CharBuffer.java | 11 | ||||
-rw-r--r-- | libjava/java/nio/DoubleBuffer.java | 3 | ||||
-rw-r--r-- | libjava/java/nio/FloatBuffer.java | 3 | ||||
-rw-r--r-- | libjava/java/nio/IntBuffer.java | 3 | ||||
-rw-r--r-- | libjava/java/nio/LongBuffer.java | 3 | ||||
-rw-r--r-- | libjava/java/nio/ShortBuffer.java | 3 |
14 files changed, 65 insertions, 21 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 7c54d610be9..5846d4a1ab0 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,5 +1,37 @@ 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. diff --git a/libjava/gnu/java/nio/ByteBufferImpl.java b/libjava/gnu/java/nio/ByteBufferImpl.java index 19783e57807..149dc1c9683 100644 --- a/libjava/gnu/java/nio/ByteBufferImpl.java +++ b/libjava/gnu/java/nio/ByteBufferImpl.java @@ -60,9 +60,9 @@ public final class ByteBufferImpl extends ByteBuffer 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; } diff --git a/libjava/gnu/java/nio/CharBufferImpl.java b/libjava/gnu/java/nio/CharBufferImpl.java index 07a96fe9c36..5126e28f096 100644 --- a/libjava/gnu/java/nio/CharBufferImpl.java +++ b/libjava/gnu/java/nio/CharBufferImpl.java @@ -56,9 +56,9 @@ public final class CharBufferImpl extends CharBuffer 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; } diff --git a/libjava/gnu/java/nio/DoubleBufferImpl.java b/libjava/gnu/java/nio/DoubleBufferImpl.java index 973487555cb..f4dffc2d8f4 100644 --- a/libjava/gnu/java/nio/DoubleBufferImpl.java +++ b/libjava/gnu/java/nio/DoubleBufferImpl.java @@ -56,9 +56,9 @@ public final class DoubleBufferImpl extends DoubleBuffer 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; } diff --git a/libjava/gnu/java/nio/FloatBufferImpl.java b/libjava/gnu/java/nio/FloatBufferImpl.java index 27a8deaf1c2..6c77103bb2f 100644 --- a/libjava/gnu/java/nio/FloatBufferImpl.java +++ b/libjava/gnu/java/nio/FloatBufferImpl.java @@ -56,9 +56,9 @@ public final class FloatBufferImpl extends FloatBuffer 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; } diff --git a/libjava/gnu/java/nio/IntBufferImpl.java b/libjava/gnu/java/nio/IntBufferImpl.java index fda2d68e00a..d9f80636aa6 100644 --- a/libjava/gnu/java/nio/IntBufferImpl.java +++ b/libjava/gnu/java/nio/IntBufferImpl.java @@ -56,9 +56,9 @@ public final class IntBufferImpl extends IntBuffer 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; } diff --git a/libjava/gnu/java/nio/LongBufferImpl.java b/libjava/gnu/java/nio/LongBufferImpl.java index 5dc4992066a..e17f4870b09 100644 --- a/libjava/gnu/java/nio/LongBufferImpl.java +++ b/libjava/gnu/java/nio/LongBufferImpl.java @@ -56,9 +56,9 @@ public final class LongBufferImpl extends LongBuffer 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; } diff --git a/libjava/gnu/java/nio/ShortBufferImpl.java b/libjava/gnu/java/nio/ShortBufferImpl.java index c55f0989ae9..e4c9a060539 100644 --- a/libjava/gnu/java/nio/ShortBufferImpl.java +++ b/libjava/gnu/java/nio/ShortBufferImpl.java @@ -56,9 +56,9 @@ public final class ShortBufferImpl extends ShortBuffer 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; } diff --git a/libjava/java/nio/CharBuffer.java b/libjava/java/nio/CharBuffer.java index 9d61be90b04..e2996023047 100644 --- a/libjava/java/nio/CharBuffer.java +++ b/libjava/java/nio/CharBuffer.java @@ -63,7 +63,7 @@ public abstract class CharBuffer extends Buffer */ final public static CharBuffer wrap (char[] array, int offset, int length) { - return new CharBufferImpl (array, offset, offset + length); + return new CharBufferImpl (array, offset, length); } /** @@ -205,7 +205,8 @@ public abstract class CharBuffer extends Buffer */ public final boolean hasArray () { - return backing_buffer != null; + return (backing_buffer != null + && ! isReadOnly ()); } /** @@ -359,6 +360,9 @@ public abstract class CharBuffer extends Buffer return new String (array (), position (), length ()); } + /** + * Returns the length of the remaining chars in this buffer. + */ public final int length () { return remaining (); @@ -370,6 +374,9 @@ public abstract class CharBuffer extends Buffer 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. */ diff --git a/libjava/java/nio/DoubleBuffer.java b/libjava/java/nio/DoubleBuffer.java index 036579a802b..27f3a16d34e 100644 --- a/libjava/java/nio/DoubleBuffer.java +++ b/libjava/java/nio/DoubleBuffer.java @@ -120,7 +120,8 @@ public abstract class DoubleBuffer extends Buffer implements Comparable public final boolean hasArray() { - return (backing_buffer != null); + return (backing_buffer != null + && !isReadOnly ()); } public final double[] array() diff --git a/libjava/java/nio/FloatBuffer.java b/libjava/java/nio/FloatBuffer.java index 8531cb99f9d..16c92d61023 100644 --- a/libjava/java/nio/FloatBuffer.java +++ b/libjava/java/nio/FloatBuffer.java @@ -121,7 +121,8 @@ public abstract class FloatBuffer extends Buffer implements Comparable public final boolean hasArray() { - return (backing_buffer != null); + return (backing_buffer != null + && !isReadOnly ()); } public final float[] array() diff --git a/libjava/java/nio/IntBuffer.java b/libjava/java/nio/IntBuffer.java index ddf03d8364d..18e353b2013 100644 --- a/libjava/java/nio/IntBuffer.java +++ b/libjava/java/nio/IntBuffer.java @@ -121,7 +121,8 @@ public abstract class IntBuffer extends Buffer implements Comparable public final boolean hasArray() { - return (backing_buffer != null); + return (backing_buffer != null + && !isReadOnly ()); } public final int[] array() diff --git a/libjava/java/nio/LongBuffer.java b/libjava/java/nio/LongBuffer.java index 63eb5af1a11..8b737194d0c 100644 --- a/libjava/java/nio/LongBuffer.java +++ b/libjava/java/nio/LongBuffer.java @@ -121,7 +121,8 @@ public abstract class LongBuffer extends Buffer implements Comparable public final boolean hasArray() { - return (backing_buffer != null); + return (backing_buffer != null + && !isReadOnly ()); } public final long[] array() diff --git a/libjava/java/nio/ShortBuffer.java b/libjava/java/nio/ShortBuffer.java index 7a71cad6d85..8c5915dc148 100644 --- a/libjava/java/nio/ShortBuffer.java +++ b/libjava/java/nio/ShortBuffer.java @@ -121,7 +121,8 @@ public abstract class ShortBuffer extends Buffer implements Comparable public final boolean hasArray() { - return (backing_buffer != null); + return (backing_buffer != null + && !isReadOnly ()); } public final short[] array() |