Commit 08c5d757 by Michael Koch Committed by Michael Koch

ByteBufferImpl.java, [...]: Made sure all classes are final and removed final…

ByteBufferImpl.java, [...]: Made sure all classes are final and removed final keyword from all methods.

2004-04-20  Michael Koch  <konqueror@gmx.de>

	* java/nio/ByteBufferImpl.java,
	java/nio/CharBufferImpl.java,
	java/nio/DirectByteBufferImpl.java,
	java/nio/DoubleBufferImpl.java,
	java/nio/DoubleViewBufferImpl.java,
	java/nio/FloatBufferImpl.java,
	java/nio/FloatViewBufferImpl.java,
	java/nio/IntBufferImpl.java,
	java/nio/IntViewBufferImpl.java,
	java/nio/LongBufferImpl.java,
	java/nio/LongViewBufferImpl.java,
	java/nio/MappedByteBufferImpl.java,
	java/nio/ShortBufferImpl.java,
	java/nio/ShortViewBufferImpl.java:
	Made sure all classes are final and removed final keyword from all
	methods.

From-SVN: r80907
parent a17c9f2e
2004-04-20 Michael Koch <konqueror@gmx.de> 2004-04-20 Michael Koch <konqueror@gmx.de>
* java/nio/ByteBufferImpl.java,
java/nio/CharBufferImpl.java,
java/nio/DirectByteBufferImpl.java,
java/nio/DoubleBufferImpl.java,
java/nio/DoubleViewBufferImpl.java,
java/nio/FloatBufferImpl.java,
java/nio/FloatViewBufferImpl.java,
java/nio/IntBufferImpl.java,
java/nio/IntViewBufferImpl.java,
java/nio/LongBufferImpl.java,
java/nio/LongViewBufferImpl.java,
java/nio/MappedByteBufferImpl.java,
java/nio/ShortBufferImpl.java,
java/nio/ShortViewBufferImpl.java:
Made sure all classes are final and removed final keyword from all
methods.
2004-04-20 Michael Koch <konqueror@gmx.de>
* java/rmi/MarshalledObject.java, * java/rmi/MarshalledObject.java,
java/rmi/Naming.java, java/rmi/Naming.java,
java/rmi/RemoteException.java, java/rmi/RemoteException.java,
......
...@@ -131,7 +131,7 @@ final class ByteBufferImpl extends ByteBuffer ...@@ -131,7 +131,7 @@ final class ByteBufferImpl extends ByteBuffer
/** /**
* Relative get method. Reads the next <code>byte</code> from the buffer. * Relative get method. Reads the next <code>byte</code> from the buffer.
*/ */
final public byte get () public byte get ()
{ {
byte result = backing_buffer [position () + array_offset]; byte result = backing_buffer [position () + array_offset];
position (position () + 1); position (position () + 1);
...@@ -144,7 +144,7 @@ final class ByteBufferImpl extends ByteBuffer ...@@ -144,7 +144,7 @@ final class ByteBufferImpl extends ByteBuffer
* *
* @exception ReadOnlyBufferException If this buffer is read-only. * @exception ReadOnlyBufferException If this buffer is read-only.
*/ */
final public ByteBuffer put (byte value) public ByteBuffer put (byte value)
{ {
if (readOnly) if (readOnly)
throw new ReadOnlyBufferException (); throw new ReadOnlyBufferException ();
...@@ -162,7 +162,7 @@ final class ByteBufferImpl extends ByteBuffer ...@@ -162,7 +162,7 @@ final class ByteBufferImpl extends ByteBuffer
* @exception IndexOutOfBoundsException If index is negative or not smaller * @exception IndexOutOfBoundsException If index is negative or not smaller
* than the buffer's limit. * than the buffer's limit.
*/ */
final public byte get (int index) public byte get (int index)
{ {
return backing_buffer [index + array_offset]; return backing_buffer [index + array_offset];
} }
...@@ -175,7 +175,7 @@ final class ByteBufferImpl extends ByteBuffer ...@@ -175,7 +175,7 @@ final class ByteBufferImpl extends ByteBuffer
* than the buffer's limit. * than the buffer's limit.
* @exception ReadOnlyBufferException If this buffer is read-only. * @exception ReadOnlyBufferException If this buffer is read-only.
*/ */
final public ByteBuffer put (int index, byte value) public ByteBuffer put (int index, byte value)
{ {
if (readOnly) if (readOnly)
throw new ReadOnlyBufferException (); throw new ReadOnlyBufferException ();
...@@ -184,133 +184,133 @@ final class ByteBufferImpl extends ByteBuffer ...@@ -184,133 +184,133 @@ final class ByteBufferImpl extends ByteBuffer
return this; return this;
} }
final public char getChar () public char getChar ()
{ {
return ByteBufferHelper.getChar(this, order()); return ByteBufferHelper.getChar(this, order());
} }
final public ByteBuffer putChar (char value) public ByteBuffer putChar (char value)
{ {
ByteBufferHelper.putChar(this, value, order()); ByteBufferHelper.putChar(this, value, order());
return this; return this;
} }
final public char getChar (int index) public char getChar (int index)
{ {
return ByteBufferHelper.getChar(this, index, order()); return ByteBufferHelper.getChar(this, index, order());
} }
final public ByteBuffer putChar (int index, char value) public ByteBuffer putChar (int index, char value)
{ {
ByteBufferHelper.putChar(this, index, value, order()); ByteBufferHelper.putChar(this, index, value, order());
return this; return this;
} }
final public short getShort () public short getShort ()
{ {
return ByteBufferHelper.getShort(this, order()); return ByteBufferHelper.getShort(this, order());
} }
final public ByteBuffer putShort (short value) public ByteBuffer putShort (short value)
{ {
ByteBufferHelper.putShort(this, value, order()); ByteBufferHelper.putShort(this, value, order());
return this; return this;
} }
final public short getShort (int index) public short getShort (int index)
{ {
return ByteBufferHelper.getShort(this, index, order()); return ByteBufferHelper.getShort(this, index, order());
} }
final public ByteBuffer putShort (int index, short value) public ByteBuffer putShort (int index, short value)
{ {
ByteBufferHelper.putShort(this, index, value, order()); ByteBufferHelper.putShort(this, index, value, order());
return this; return this;
} }
final public int getInt () public int getInt ()
{ {
return ByteBufferHelper.getInt(this, order()); return ByteBufferHelper.getInt(this, order());
} }
final public ByteBuffer putInt (int value) public ByteBuffer putInt (int value)
{ {
ByteBufferHelper.putInt(this, value, order()); ByteBufferHelper.putInt(this, value, order());
return this; return this;
} }
final public int getInt (int index) public int getInt (int index)
{ {
return ByteBufferHelper.getInt(this, index, order()); return ByteBufferHelper.getInt(this, index, order());
} }
final public ByteBuffer putInt (int index, int value) public ByteBuffer putInt (int index, int value)
{ {
ByteBufferHelper.putInt(this, index, value, order()); ByteBufferHelper.putInt(this, index, value, order());
return this; return this;
} }
final public long getLong () public long getLong ()
{ {
return ByteBufferHelper.getLong(this, order()); return ByteBufferHelper.getLong(this, order());
} }
final public ByteBuffer putLong (long value) public ByteBuffer putLong (long value)
{ {
ByteBufferHelper.putLong (this, value, order()); ByteBufferHelper.putLong (this, value, order());
return this; return this;
} }
final public long getLong (int index) public long getLong (int index)
{ {
return ByteBufferHelper.getLong (this, index, order()); return ByteBufferHelper.getLong (this, index, order());
} }
final public ByteBuffer putLong (int index, long value) public ByteBuffer putLong (int index, long value)
{ {
ByteBufferHelper.putLong (this, index, value, order()); ByteBufferHelper.putLong (this, index, value, order());
return this; return this;
} }
final public float getFloat () public float getFloat ()
{ {
return ByteBufferHelper.getFloat (this, order()); return ByteBufferHelper.getFloat (this, order());
} }
final public ByteBuffer putFloat (float value) public ByteBuffer putFloat (float value)
{ {
ByteBufferHelper.putFloat (this, value, order()); ByteBufferHelper.putFloat (this, value, order());
return this; return this;
} }
public final float getFloat (int index) public float getFloat (int index)
{ {
return ByteBufferHelper.getFloat (this, index, order()); return ByteBufferHelper.getFloat (this, index, order());
} }
final public ByteBuffer putFloat (int index, float value) public ByteBuffer putFloat (int index, float value)
{ {
ByteBufferHelper.putFloat (this, index, value, order()); ByteBufferHelper.putFloat (this, index, value, order());
return this; return this;
} }
final public double getDouble () public double getDouble ()
{ {
return ByteBufferHelper.getDouble (this, order()); return ByteBufferHelper.getDouble (this, order());
} }
final public ByteBuffer putDouble (double value) public ByteBuffer putDouble (double value)
{ {
ByteBufferHelper.putDouble (this, value, order()); ByteBufferHelper.putDouble (this, value, order());
return this; return this;
} }
final public double getDouble (int index) public double getDouble (int index)
{ {
return ByteBufferHelper.getDouble (this, index, order()); return ByteBufferHelper.getDouble (this, index, order());
} }
final public ByteBuffer putDouble (int index, double value) public ByteBuffer putDouble (int index, double value)
{ {
ByteBufferHelper.putDouble (this, index, value, order()); ByteBufferHelper.putDouble (this, index, value, order());
return this; return this;
......
...@@ -104,7 +104,7 @@ final class CharBufferImpl extends CharBuffer ...@@ -104,7 +104,7 @@ final class CharBufferImpl extends CharBuffer
return false; return false;
} }
final public CharSequence subSequence (int start, int end) public CharSequence subSequence (int start, int end)
{ {
if (start < 0 if (start < 0
|| start > length () || start > length ()
...@@ -118,7 +118,7 @@ final class CharBufferImpl extends CharBuffer ...@@ -118,7 +118,7 @@ final class CharBufferImpl extends CharBuffer
/** /**
* Relative get method. Reads the next <code>char</code> from the buffer. * Relative get method. Reads the next <code>char</code> from the buffer.
*/ */
final public char get () public char get ()
{ {
char result = backing_buffer [position ()]; char result = backing_buffer [position ()];
position (position () + 1); position (position () + 1);
...@@ -131,7 +131,7 @@ final class CharBufferImpl extends CharBuffer ...@@ -131,7 +131,7 @@ final class CharBufferImpl extends CharBuffer
* *
* @exception ReadOnlyBufferException If this buffer is read-only. * @exception ReadOnlyBufferException If this buffer is read-only.
*/ */
final public CharBuffer put (char value) public CharBuffer put (char value)
{ {
if (readOnly) if (readOnly)
throw new ReadOnlyBufferException (); throw new ReadOnlyBufferException ();
...@@ -148,7 +148,7 @@ final class CharBufferImpl extends CharBuffer ...@@ -148,7 +148,7 @@ final class CharBufferImpl extends CharBuffer
* @exception IndexOutOfBoundsException If index is negative or not smaller * @exception IndexOutOfBoundsException If index is negative or not smaller
* than the buffer's limit. * than the buffer's limit.
*/ */
final public char get (int index) public char get (int index)
{ {
if (index < 0 if (index < 0
|| index >= limit ()) || index >= limit ())
...@@ -165,7 +165,7 @@ final class CharBufferImpl extends CharBuffer ...@@ -165,7 +165,7 @@ final class CharBufferImpl extends CharBuffer
* than the buffer's limit. * than the buffer's limit.
* @exception ReadOnlyBufferException If this buffer is read-only. * @exception ReadOnlyBufferException If this buffer is read-only.
*/ */
final public CharBuffer put (int index, char value) public CharBuffer put (int index, char value)
{ {
if (index < 0 if (index < 0
|| index >= limit ()) || index >= limit ())
...@@ -178,7 +178,7 @@ final class CharBufferImpl extends CharBuffer ...@@ -178,7 +178,7 @@ final class CharBufferImpl extends CharBuffer
return this; return this;
} }
final public ByteOrder order () public ByteOrder order ()
{ {
return ByteOrder.nativeOrder (); return ByteOrder.nativeOrder ();
} }
......
...@@ -41,7 +41,7 @@ package java.nio; ...@@ -41,7 +41,7 @@ package java.nio;
import gnu.classpath.Configuration; import gnu.classpath.Configuration;
import gnu.gcj.RawData; import gnu.gcj.RawData;
class DirectByteBufferImpl extends ByteBuffer final class DirectByteBufferImpl extends ByteBuffer
{ {
static static
{ {
...@@ -229,133 +229,133 @@ class DirectByteBufferImpl extends ByteBuffer ...@@ -229,133 +229,133 @@ class DirectByteBufferImpl extends ByteBuffer
return new DoubleViewBufferImpl (this, remaining() >> 3); return new DoubleViewBufferImpl (this, remaining() >> 3);
} }
final public char getChar () public char getChar ()
{ {
return ByteBufferHelper.getChar(this, order()); return ByteBufferHelper.getChar(this, order());
} }
final public ByteBuffer putChar (char value) public ByteBuffer putChar (char value)
{ {
ByteBufferHelper.putChar(this, value, order()); ByteBufferHelper.putChar(this, value, order());
return this; return this;
} }
final public char getChar (int index) public char getChar (int index)
{ {
return ByteBufferHelper.getChar(this, index, order()); return ByteBufferHelper.getChar(this, index, order());
} }
final public ByteBuffer putChar (int index, char value) public ByteBuffer putChar (int index, char value)
{ {
ByteBufferHelper.putChar(this, index, value, order()); ByteBufferHelper.putChar(this, index, value, order());
return this; return this;
} }
final public short getShort () public short getShort ()
{ {
return ByteBufferHelper.getShort(this, order()); return ByteBufferHelper.getShort(this, order());
} }
final public ByteBuffer putShort (short value) public ByteBuffer putShort (short value)
{ {
ByteBufferHelper.putShort(this, value, order()); ByteBufferHelper.putShort(this, value, order());
return this; return this;
} }
final public short getShort (int index) public short getShort (int index)
{ {
return ByteBufferHelper.getShort(this, index, order()); return ByteBufferHelper.getShort(this, index, order());
} }
final public ByteBuffer putShort (int index, short value) public ByteBuffer putShort (int index, short value)
{ {
ByteBufferHelper.putShort(this, index, value, order()); ByteBufferHelper.putShort(this, index, value, order());
return this; return this;
} }
final public int getInt () public int getInt ()
{ {
return ByteBufferHelper.getInt(this, order()); return ByteBufferHelper.getInt(this, order());
} }
final public ByteBuffer putInt (int value) public ByteBuffer putInt (int value)
{ {
ByteBufferHelper.putInt(this, value, order()); ByteBufferHelper.putInt(this, value, order());
return this; return this;
} }
final public int getInt (int index) public int getInt (int index)
{ {
return ByteBufferHelper.getInt(this, index, order()); return ByteBufferHelper.getInt(this, index, order());
} }
final public ByteBuffer putInt (int index, int value) public ByteBuffer putInt (int index, int value)
{ {
ByteBufferHelper.putInt(this, index, value, order()); ByteBufferHelper.putInt(this, index, value, order());
return this; return this;
} }
final public long getLong () public long getLong ()
{ {
return ByteBufferHelper.getLong(this, order()); return ByteBufferHelper.getLong(this, order());
} }
final public ByteBuffer putLong (long value) public ByteBuffer putLong (long value)
{ {
ByteBufferHelper.putLong (this, value, order()); ByteBufferHelper.putLong (this, value, order());
return this; return this;
} }
final public long getLong (int index) public long getLong (int index)
{ {
return ByteBufferHelper.getLong (this, index, order()); return ByteBufferHelper.getLong (this, index, order());
} }
final public ByteBuffer putLong (int index, long value) public ByteBuffer putLong (int index, long value)
{ {
ByteBufferHelper.putLong (this, index, value, order()); ByteBufferHelper.putLong (this, index, value, order());
return this; return this;
} }
final public float getFloat () public float getFloat ()
{ {
return ByteBufferHelper.getFloat (this, order()); return ByteBufferHelper.getFloat (this, order());
} }
final public ByteBuffer putFloat (float value) public ByteBuffer putFloat (float value)
{ {
ByteBufferHelper.putFloat (this, value, order()); ByteBufferHelper.putFloat (this, value, order());
return this; return this;
} }
public final float getFloat (int index) public float getFloat (int index)
{ {
return ByteBufferHelper.getFloat (this, index, order()); return ByteBufferHelper.getFloat (this, index, order());
} }
final public ByteBuffer putFloat (int index, float value) public ByteBuffer putFloat (int index, float value)
{ {
ByteBufferHelper.putFloat (this, index, value, order()); ByteBufferHelper.putFloat (this, index, value, order());
return this; return this;
} }
final public double getDouble () public double getDouble ()
{ {
return ByteBufferHelper.getDouble (this, order()); return ByteBufferHelper.getDouble (this, order());
} }
final public ByteBuffer putDouble (double value) public ByteBuffer putDouble (double value)
{ {
ByteBufferHelper.putDouble (this, value, order()); ByteBufferHelper.putDouble (this, value, order());
return this; return this;
} }
final public double getDouble (int index) public double getDouble (int index)
{ {
return ByteBufferHelper.getDouble (this, index, order()); return ByteBufferHelper.getDouble (this, index, order());
} }
final public ByteBuffer putDouble (int index, double value) public ByteBuffer putDouble (int index, double value)
{ {
ByteBufferHelper.putDouble (this, index, value, order()); ByteBufferHelper.putDouble (this, index, value, order());
return this; return this;
......
...@@ -100,7 +100,7 @@ final class DoubleBufferImpl extends DoubleBuffer ...@@ -100,7 +100,7 @@ final class DoubleBufferImpl extends DoubleBuffer
/** /**
* Relative get method. Reads the next <code>double</code> from the buffer. * Relative get method. Reads the next <code>double</code> from the buffer.
*/ */
final public double get () public double get ()
{ {
double result = backing_buffer [position ()]; double result = backing_buffer [position ()];
position (position () + 1); position (position () + 1);
...@@ -113,7 +113,7 @@ final class DoubleBufferImpl extends DoubleBuffer ...@@ -113,7 +113,7 @@ final class DoubleBufferImpl extends DoubleBuffer
* *
* @exception ReadOnlyBufferException If this buffer is read-only. * @exception ReadOnlyBufferException If this buffer is read-only.
*/ */
final public DoubleBuffer put (double value) public DoubleBuffer put (double value)
{ {
if (readOnly) if (readOnly)
throw new ReadOnlyBufferException (); throw new ReadOnlyBufferException ();
...@@ -130,7 +130,7 @@ final class DoubleBufferImpl extends DoubleBuffer ...@@ -130,7 +130,7 @@ final class DoubleBufferImpl extends DoubleBuffer
* @exception IndexOutOfBoundsException If index is negative or not smaller * @exception IndexOutOfBoundsException If index is negative or not smaller
* than the buffer's limit. * than the buffer's limit.
*/ */
final public double get (int index) public double get (int index)
{ {
return backing_buffer [index]; return backing_buffer [index];
} }
...@@ -143,7 +143,7 @@ final class DoubleBufferImpl extends DoubleBuffer ...@@ -143,7 +143,7 @@ final class DoubleBufferImpl extends DoubleBuffer
* than the buffer's limit. * than the buffer's limit.
* @exception ReadOnlyBufferException If this buffer is read-only. * @exception ReadOnlyBufferException If this buffer is read-only.
*/ */
final public DoubleBuffer put (int index, double value) public DoubleBuffer put (int index, double value)
{ {
if (readOnly) if (readOnly)
throw new ReadOnlyBufferException (); throw new ReadOnlyBufferException ();
...@@ -152,7 +152,7 @@ final class DoubleBufferImpl extends DoubleBuffer ...@@ -152,7 +152,7 @@ final class DoubleBufferImpl extends DoubleBuffer
return this; return this;
} }
final public ByteOrder order () public ByteOrder order ()
{ {
return ByteOrder.nativeOrder (); return ByteOrder.nativeOrder ();
} }
......
...@@ -38,7 +38,7 @@ exception statement from your version. */ ...@@ -38,7 +38,7 @@ exception statement from your version. */
package java.nio; package java.nio;
class DoubleViewBufferImpl extends DoubleBuffer final class DoubleViewBufferImpl extends DoubleBuffer
{ {
/** Position in bb (i.e. a byte offset) where this buffer starts. */ /** Position in bb (i.e. a byte offset) where this buffer starts. */
private int offset; private int offset;
......
...@@ -100,7 +100,7 @@ final class FloatBufferImpl extends FloatBuffer ...@@ -100,7 +100,7 @@ final class FloatBufferImpl extends FloatBuffer
/** /**
* Relative get method. Reads the next <code>float</code> from the buffer. * Relative get method. Reads the next <code>float</code> from the buffer.
*/ */
final public float get () public float get ()
{ {
float result = backing_buffer [position ()]; float result = backing_buffer [position ()];
position (position () + 1); position (position () + 1);
...@@ -113,7 +113,7 @@ final class FloatBufferImpl extends FloatBuffer ...@@ -113,7 +113,7 @@ final class FloatBufferImpl extends FloatBuffer
* *
* @exception ReadOnlyBufferException If this buffer is read-only. * @exception ReadOnlyBufferException If this buffer is read-only.
*/ */
final public FloatBuffer put (float value) public FloatBuffer put (float value)
{ {
if (readOnly) if (readOnly)
throw new ReadOnlyBufferException (); throw new ReadOnlyBufferException ();
...@@ -130,7 +130,7 @@ final class FloatBufferImpl extends FloatBuffer ...@@ -130,7 +130,7 @@ final class FloatBufferImpl extends FloatBuffer
* @exception IndexOutOfBoundsException If index is negative or not smaller * @exception IndexOutOfBoundsException If index is negative or not smaller
* than the buffer's limit. * than the buffer's limit.
*/ */
final public float get (int index) public float get (int index)
{ {
return backing_buffer [index]; return backing_buffer [index];
} }
...@@ -143,7 +143,7 @@ final class FloatBufferImpl extends FloatBuffer ...@@ -143,7 +143,7 @@ final class FloatBufferImpl extends FloatBuffer
* than the buffer's limit. * than the buffer's limit.
* @exception ReadOnlyBufferException If this buffer is read-only. * @exception ReadOnlyBufferException If this buffer is read-only.
*/ */
final public FloatBuffer put (int index, float value) public FloatBuffer put (int index, float value)
{ {
if (readOnly) if (readOnly)
throw new ReadOnlyBufferException (); throw new ReadOnlyBufferException ();
...@@ -152,7 +152,7 @@ final class FloatBufferImpl extends FloatBuffer ...@@ -152,7 +152,7 @@ final class FloatBufferImpl extends FloatBuffer
return this; return this;
} }
final public ByteOrder order () public ByteOrder order ()
{ {
return ByteOrder.nativeOrder (); return ByteOrder.nativeOrder ();
} }
......
...@@ -38,7 +38,7 @@ exception statement from your version. */ ...@@ -38,7 +38,7 @@ exception statement from your version. */
package java.nio; package java.nio;
class FloatViewBufferImpl extends FloatBuffer final class FloatViewBufferImpl extends FloatBuffer
{ {
/** Position in bb (i.e. a byte offset) where this buffer starts. */ /** Position in bb (i.e. a byte offset) where this buffer starts. */
private int offset; private int offset;
......
...@@ -100,7 +100,7 @@ final class IntBufferImpl extends IntBuffer ...@@ -100,7 +100,7 @@ final class IntBufferImpl extends IntBuffer
/** /**
* Relative get method. Reads the next <code>int</code> from the buffer. * Relative get method. Reads the next <code>int</code> from the buffer.
*/ */
final public int get () public int get ()
{ {
int result = backing_buffer [position ()]; int result = backing_buffer [position ()];
position (position () + 1); position (position () + 1);
...@@ -113,7 +113,7 @@ final class IntBufferImpl extends IntBuffer ...@@ -113,7 +113,7 @@ final class IntBufferImpl extends IntBuffer
* *
* @exception ReadOnlyBufferException If this buffer is read-only. * @exception ReadOnlyBufferException If this buffer is read-only.
*/ */
final public IntBuffer put (int value) public IntBuffer put (int value)
{ {
if (readOnly) if (readOnly)
throw new ReadOnlyBufferException (); throw new ReadOnlyBufferException ();
...@@ -130,7 +130,7 @@ final class IntBufferImpl extends IntBuffer ...@@ -130,7 +130,7 @@ final class IntBufferImpl extends IntBuffer
* @exception IndexOutOfBoundsException If index is negative or not smaller * @exception IndexOutOfBoundsException If index is negative or not smaller
* than the buffer's limit. * than the buffer's limit.
*/ */
final public int get (int index) public int get (int index)
{ {
return backing_buffer [index]; return backing_buffer [index];
} }
...@@ -143,7 +143,7 @@ final class IntBufferImpl extends IntBuffer ...@@ -143,7 +143,7 @@ final class IntBufferImpl extends IntBuffer
* than the buffer's limit. * than the buffer's limit.
* @exception ReadOnlyBufferException If this buffer is read-only. * @exception ReadOnlyBufferException If this buffer is read-only.
*/ */
final public IntBuffer put (int index, int value) public IntBuffer put (int index, int value)
{ {
if (readOnly) if (readOnly)
throw new ReadOnlyBufferException (); throw new ReadOnlyBufferException ();
...@@ -152,7 +152,7 @@ final class IntBufferImpl extends IntBuffer ...@@ -152,7 +152,7 @@ final class IntBufferImpl extends IntBuffer
return this; return this;
} }
final public ByteOrder order () public ByteOrder order ()
{ {
return ByteOrder.nativeOrder (); return ByteOrder.nativeOrder ();
} }
......
...@@ -38,7 +38,7 @@ exception statement from your version. */ ...@@ -38,7 +38,7 @@ exception statement from your version. */
package java.nio; package java.nio;
class IntViewBufferImpl extends IntBuffer final class IntViewBufferImpl extends IntBuffer
{ {
/** Position in bb (i.e. a byte offset) where this buffer starts. */ /** Position in bb (i.e. a byte offset) where this buffer starts. */
private int offset; private int offset;
......
...@@ -100,7 +100,7 @@ final class LongBufferImpl extends LongBuffer ...@@ -100,7 +100,7 @@ final class LongBufferImpl extends LongBuffer
/** /**
* Relative get method. Reads the next <code>long</code> from the buffer. * Relative get method. Reads the next <code>long</code> from the buffer.
*/ */
final public long get () public long get ()
{ {
long result = backing_buffer [position ()]; long result = backing_buffer [position ()];
position (position () + 1); position (position () + 1);
...@@ -113,7 +113,7 @@ final class LongBufferImpl extends LongBuffer ...@@ -113,7 +113,7 @@ final class LongBufferImpl extends LongBuffer
* *
* @exception ReadOnlyBufferException If this buffer is read-only. * @exception ReadOnlyBufferException If this buffer is read-only.
*/ */
final public LongBuffer put (long value) public LongBuffer put (long value)
{ {
if (readOnly) if (readOnly)
throw new ReadOnlyBufferException (); throw new ReadOnlyBufferException ();
...@@ -130,7 +130,7 @@ final class LongBufferImpl extends LongBuffer ...@@ -130,7 +130,7 @@ final class LongBufferImpl extends LongBuffer
* @exception IndexOutOfBoundsException If index is negative or not smaller * @exception IndexOutOfBoundsException If index is negative or not smaller
* than the buffer's limit. * than the buffer's limit.
*/ */
final public long get (int index) public long get (int index)
{ {
return backing_buffer [index]; return backing_buffer [index];
} }
...@@ -143,7 +143,7 @@ final class LongBufferImpl extends LongBuffer ...@@ -143,7 +143,7 @@ final class LongBufferImpl extends LongBuffer
* than the buffer's limit. * than the buffer's limit.
* @exception ReadOnlyBufferException If this buffer is read-only. * @exception ReadOnlyBufferException If this buffer is read-only.
*/ */
final public LongBuffer put (int index, long value) public LongBuffer put (int index, long value)
{ {
if (readOnly) if (readOnly)
throw new ReadOnlyBufferException (); throw new ReadOnlyBufferException ();
...@@ -152,7 +152,7 @@ final class LongBufferImpl extends LongBuffer ...@@ -152,7 +152,7 @@ final class LongBufferImpl extends LongBuffer
return this; return this;
} }
final public ByteOrder order () public ByteOrder order ()
{ {
return ByteOrder.nativeOrder (); return ByteOrder.nativeOrder ();
} }
......
...@@ -38,7 +38,7 @@ exception statement from your version. */ ...@@ -38,7 +38,7 @@ exception statement from your version. */
package java.nio; package java.nio;
class LongViewBufferImpl extends LongBuffer final class LongViewBufferImpl extends LongBuffer
{ {
/** Position in bb (i.e. a byte offset) where this buffer starts. */ /** Position in bb (i.e. a byte offset) where this buffer starts. */
private int offset; private int offset;
......
...@@ -39,10 +39,9 @@ exception statement from your version. */ ...@@ -39,10 +39,9 @@ exception statement from your version. */
package java.nio; package java.nio;
import java.io.IOException; import java.io.IOException;
import gnu.java.nio.channels.FileChannelImpl;
import gnu.gcj.RawData; import gnu.gcj.RawData;
class MappedByteBufferImpl extends MappedByteBuffer final class MappedByteBufferImpl extends MappedByteBuffer
{ {
boolean readOnly; boolean readOnly;
RawData address; RawData address;
...@@ -201,133 +200,133 @@ class MappedByteBufferImpl extends MappedByteBuffer ...@@ -201,133 +200,133 @@ class MappedByteBufferImpl extends MappedByteBuffer
return new DoubleViewBufferImpl (this, remaining() >> 3); return new DoubleViewBufferImpl (this, remaining() >> 3);
} }
final public char getChar () public char getChar ()
{ {
return ByteBufferHelper.getChar(this, order()); return ByteBufferHelper.getChar(this, order());
} }
final public ByteBuffer putChar (char value) public ByteBuffer putChar (char value)
{ {
ByteBufferHelper.putChar(this, value, order()); ByteBufferHelper.putChar(this, value, order());
return this; return this;
} }
final public char getChar (int index) public char getChar (int index)
{ {
return ByteBufferHelper.getChar(this, index, order()); return ByteBufferHelper.getChar(this, index, order());
} }
final public ByteBuffer putChar (int index, char value) public ByteBuffer putChar (int index, char value)
{ {
ByteBufferHelper.putChar(this, index, value, order()); ByteBufferHelper.putChar(this, index, value, order());
return this; return this;
} }
final public short getShort () public short getShort ()
{ {
return ByteBufferHelper.getShort(this, order()); return ByteBufferHelper.getShort(this, order());
} }
final public ByteBuffer putShort (short value) public ByteBuffer putShort (short value)
{ {
ByteBufferHelper.putShort(this, value, order()); ByteBufferHelper.putShort(this, value, order());
return this; return this;
} }
final public short getShort (int index) public short getShort (int index)
{ {
return ByteBufferHelper.getShort(this, index, order()); return ByteBufferHelper.getShort(this, index, order());
} }
final public ByteBuffer putShort (int index, short value) public ByteBuffer putShort (int index, short value)
{ {
ByteBufferHelper.putShort(this, index, value, order()); ByteBufferHelper.putShort(this, index, value, order());
return this; return this;
} }
final public int getInt () public int getInt ()
{ {
return ByteBufferHelper.getInt(this, order()); return ByteBufferHelper.getInt(this, order());
} }
final public ByteBuffer putInt (int value) public ByteBuffer putInt (int value)
{ {
ByteBufferHelper.putInt(this, value, order()); ByteBufferHelper.putInt(this, value, order());
return this; return this;
} }
final public int getInt (int index) public int getInt (int index)
{ {
return ByteBufferHelper.getInt(this, index, order()); return ByteBufferHelper.getInt(this, index, order());
} }
final public ByteBuffer putInt (int index, int value) public ByteBuffer putInt (int index, int value)
{ {
ByteBufferHelper.putInt(this, index, value, order()); ByteBufferHelper.putInt(this, index, value, order());
return this; return this;
} }
final public long getLong () public long getLong ()
{ {
return ByteBufferHelper.getLong(this, order()); return ByteBufferHelper.getLong(this, order());
} }
final public ByteBuffer putLong (long value) public ByteBuffer putLong (long value)
{ {
ByteBufferHelper.putLong (this, value, order()); ByteBufferHelper.putLong (this, value, order());
return this; return this;
} }
final public long getLong (int index) public long getLong (int index)
{ {
return ByteBufferHelper.getLong (this, index, order()); return ByteBufferHelper.getLong (this, index, order());
} }
final public ByteBuffer putLong (int index, long value) public ByteBuffer putLong (int index, long value)
{ {
ByteBufferHelper.putLong (this, index, value, order()); ByteBufferHelper.putLong (this, index, value, order());
return this; return this;
} }
final public float getFloat () public float getFloat ()
{ {
return ByteBufferHelper.getFloat (this, order()); return ByteBufferHelper.getFloat (this, order());
} }
final public ByteBuffer putFloat (float value) public ByteBuffer putFloat (float value)
{ {
ByteBufferHelper.putFloat (this, value, order()); ByteBufferHelper.putFloat (this, value, order());
return this; return this;
} }
public final float getFloat (int index) public float getFloat (int index)
{ {
return ByteBufferHelper.getFloat (this, index, order()); return ByteBufferHelper.getFloat (this, index, order());
} }
final public ByteBuffer putFloat (int index, float value) public ByteBuffer putFloat (int index, float value)
{ {
ByteBufferHelper.putFloat (this, index, value, order()); ByteBufferHelper.putFloat (this, index, value, order());
return this; return this;
} }
final public double getDouble () public double getDouble ()
{ {
return ByteBufferHelper.getDouble (this, order()); return ByteBufferHelper.getDouble (this, order());
} }
final public ByteBuffer putDouble (double value) public ByteBuffer putDouble (double value)
{ {
ByteBufferHelper.putDouble (this, value, order()); ByteBufferHelper.putDouble (this, value, order());
return this; return this;
} }
final public double getDouble (int index) public double getDouble (int index)
{ {
return ByteBufferHelper.getDouble (this, index, order()); return ByteBufferHelper.getDouble (this, index, order());
} }
final public ByteBuffer putDouble (int index, double value) public ByteBuffer putDouble (int index, double value)
{ {
ByteBufferHelper.putDouble (this, index, value, order()); ByteBufferHelper.putDouble (this, index, value, order());
return this; return this;
......
...@@ -100,7 +100,7 @@ final class ShortBufferImpl extends ShortBuffer ...@@ -100,7 +100,7 @@ final class ShortBufferImpl extends ShortBuffer
/** /**
* Relative get method. Reads the next <code>short</code> from the buffer. * Relative get method. Reads the next <code>short</code> from the buffer.
*/ */
final public short get () public short get ()
{ {
short result = backing_buffer [position ()]; short result = backing_buffer [position ()];
position (position () + 1); position (position () + 1);
...@@ -113,7 +113,7 @@ final class ShortBufferImpl extends ShortBuffer ...@@ -113,7 +113,7 @@ final class ShortBufferImpl extends ShortBuffer
* *
* @exception ReadOnlyBufferException If this buffer is read-only. * @exception ReadOnlyBufferException If this buffer is read-only.
*/ */
final public ShortBuffer put (short value) public ShortBuffer put (short value)
{ {
if (readOnly) if (readOnly)
throw new ReadOnlyBufferException (); throw new ReadOnlyBufferException ();
...@@ -130,7 +130,7 @@ final class ShortBufferImpl extends ShortBuffer ...@@ -130,7 +130,7 @@ final class ShortBufferImpl extends ShortBuffer
* @exception IndexOutOfBoundsException If index is negative or not smaller * @exception IndexOutOfBoundsException If index is negative or not smaller
* than the buffer's limit. * than the buffer's limit.
*/ */
final public short get (int index) public short get (int index)
{ {
return backing_buffer [index]; return backing_buffer [index];
} }
...@@ -143,7 +143,7 @@ final class ShortBufferImpl extends ShortBuffer ...@@ -143,7 +143,7 @@ final class ShortBufferImpl extends ShortBuffer
* than the buffer's limit. * than the buffer's limit.
* @exception ReadOnlyBufferException If this buffer is read-only. * @exception ReadOnlyBufferException If this buffer is read-only.
*/ */
final public ShortBuffer put (int index, short value) public ShortBuffer put (int index, short value)
{ {
if (readOnly) if (readOnly)
throw new ReadOnlyBufferException (); throw new ReadOnlyBufferException ();
...@@ -152,7 +152,7 @@ final class ShortBufferImpl extends ShortBuffer ...@@ -152,7 +152,7 @@ final class ShortBufferImpl extends ShortBuffer
return this; return this;
} }
final public ByteOrder order () public ByteOrder order ()
{ {
return ByteOrder.nativeOrder (); return ByteOrder.nativeOrder ();
} }
......
...@@ -38,7 +38,7 @@ exception statement from your version. */ ...@@ -38,7 +38,7 @@ exception statement from your version. */
package java.nio; package java.nio;
class ShortViewBufferImpl extends ShortBuffer final class ShortViewBufferImpl extends ShortBuffer
{ {
/** Position in bb (i.e. a byte offset) where this buffer starts. */ /** Position in bb (i.e. a byte offset) where this buffer starts. */
private int offset; private int offset;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment