summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Koch <konqueror@gmx.de>2003-05-20 10:34:20 +0000
committerMichael Koch <konqueror@gmx.de>2003-05-20 10:34:20 +0000
commit5f8ea513bce900c7b556e5ed576ce2163b74a010 (patch)
tree2a245f92880bacb5299ce03bc475e492e4138493
parent99ad7b332a803cf1d670dfb9c23fbc9991f21ebb (diff)
downloadclasspath-5f8ea513bce900c7b556e5ed576ce2163b74a010.tar.gz
2003-05-20 Michael Koch <konqueror@gmx.de>
* gnu/java/nio/ByteBufferImpl.java, gnu/java/nio/CharBufferImpl.java, gnu/java/nio/DoubleBufferImpl.java, gnu/java/nio/FloatBufferImpl.java, gnu/java/nio/IntBufferImpl.java, gnu/java/nio/LongBufferImpl.java, gnu/java/nio/ShortBufferImpl.java: Moved to java/nio. * gnu/java/nio/SocketChannelImpl.java (write): Dont use ByteBufferImpl directly. * gnu/java/nio/Makefile.am: (EXTRA_DIST): Removed moved files. * java/nio/ByteBuffer.java, java/nio/CharBuffer.java, java/nio/DoubleBuffer.java, java/nio/FloatBuffer.java, java/nio/IntBuffer.java, java/nio/LongBuffer.java, java/nio/ShortBuffer.java: Dont import anything. * java/nio/ByteBufferImpl.java, java/nio/CharBufferImpl.java, java/nio/DoubleBufferImpl.java, java/nio/FloatBufferImpl.java, java/nio/IntBufferImpl.java, java/nio/LongBufferImpl.java, java/nio/ShortBufferImpl.java: Moved from gnu/java/nio. * java/nio/Makefile.am (EXTRA_DIST): Added moved files.
-rw-r--r--ChangeLog33
-rw-r--r--gnu/java/nio/Makefile.am7
-rw-r--r--gnu/java/nio/SocketChannelImpl.java21
-rw-r--r--java/nio/ByteBuffer.java11
-rw-r--r--java/nio/ByteBufferImpl.java (renamed from gnu/java/nio/ByteBufferImpl.java)27
-rw-r--r--java/nio/CharBuffer.java9
-rw-r--r--java/nio/CharBufferImpl.java (renamed from gnu/java/nio/CharBufferImpl.java)11
-rw-r--r--java/nio/DoubleBuffer.java9
-rw-r--r--java/nio/DoubleBufferImpl.java (renamed from gnu/java/nio/DoubleBufferImpl.java)11
-rw-r--r--java/nio/FloatBuffer.java9
-rw-r--r--java/nio/FloatBufferImpl.java (renamed from gnu/java/nio/FloatBufferImpl.java)11
-rw-r--r--java/nio/IntBuffer.java9
-rw-r--r--java/nio/IntBufferImpl.java (renamed from gnu/java/nio/IntBufferImpl.java)11
-rw-r--r--java/nio/LongBuffer.java9
-rw-r--r--java/nio/LongBufferImpl.java (renamed from gnu/java/nio/LongBufferImpl.java)11
-rw-r--r--java/nio/Makefile.am7
-rw-r--r--java/nio/ShortBuffer.java9
-rw-r--r--java/nio/ShortBufferImpl.java (renamed from gnu/java/nio/ShortBufferImpl.java)11
18 files changed, 106 insertions, 120 deletions
diff --git a/ChangeLog b/ChangeLog
index 28bacad01..ee55b45b9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,36 @@
+2003-05-20 Michael Koch <konqueror@gmx.de>
+
+ * gnu/java/nio/ByteBufferImpl.java,
+ gnu/java/nio/CharBufferImpl.java,
+ gnu/java/nio/DoubleBufferImpl.java,
+ gnu/java/nio/FloatBufferImpl.java,
+ gnu/java/nio/IntBufferImpl.java,
+ gnu/java/nio/LongBufferImpl.java,
+ gnu/java/nio/ShortBufferImpl.java:
+ Moved to java/nio.
+ * gnu/java/nio/SocketChannelImpl.java
+ (write): Dont use ByteBufferImpl directly.
+ * gnu/java/nio/Makefile.am:
+ (EXTRA_DIST): Removed moved files.
+ * java/nio/ByteBuffer.java,
+ java/nio/CharBuffer.java,
+ java/nio/DoubleBuffer.java,
+ java/nio/FloatBuffer.java,
+ java/nio/IntBuffer.java,
+ java/nio/LongBuffer.java,
+ java/nio/ShortBuffer.java:
+ Dont import anything.
+ * java/nio/ByteBufferImpl.java,
+ java/nio/CharBufferImpl.java,
+ java/nio/DoubleBufferImpl.java,
+ java/nio/FloatBufferImpl.java,
+ java/nio/IntBufferImpl.java,
+ java/nio/LongBufferImpl.java,
+ java/nio/ShortBufferImpl.java:
+ Moved from gnu/java/nio.
+ * java/nio/Makefile.am
+ (EXTRA_DIST): Added moved files.
+
2003-05-19 Michael Koch <konqueror@gmx.de>
* java/nio/ByteBuffer.java
diff --git a/gnu/java/nio/Makefile.am b/gnu/java/nio/Makefile.am
index a2b6ffb07..92212c73b 100644
--- a/gnu/java/nio/Makefile.am
+++ b/gnu/java/nio/Makefile.am
@@ -1,15 +1,9 @@
SUBDIRS = charset
EXTRA_DIST= \
-ByteBufferImpl.java \
-CharBufferImpl.java \
DatagramChannelImpl.java \
-DoubleBufferImpl.java \
FileChannelImpl.java \
FileLockImpl.java \
-FloatBufferImpl.java \
-IntBufferImpl.java \
-LongBufferImpl.java \
MappedByteFileBuffer.java \
MappedCharFileBuffer.java \
MappedDoubleFileBuffer.java \
@@ -22,5 +16,4 @@ SelectionKeyImpl.java \
SelectorImpl.java \
SelectorProviderImpl.java \
ServerSocketChannelImpl.java \
-ShortBufferImpl.java \
SocketChannelImpl.java
diff --git a/gnu/java/nio/SocketChannelImpl.java b/gnu/java/nio/SocketChannelImpl.java
index 9f2de278d..d38b11887 100644
--- a/gnu/java/nio/SocketChannelImpl.java
+++ b/gnu/java/nio/SocketChannelImpl.java
@@ -193,18 +193,17 @@ public class SocketChannelImpl extends SocketChannel
int bytes = 0;
int len = src.position();
- if (src instanceof ByteBufferImpl)
- {
- ByteBufferImpl bi = (ByteBufferImpl) src;
- byte[]b = bi.array();
- bytes = SocketWrite(fd, b, 0, len);
- }
+ if (src.hasArray ())
+ {
+ byte[] b = src.array ();
+ bytes = SocketWrite (fd, b, 0, len);
+ }
else
- {
- byte[]b = new byte[len];
- src.get(b, 0, len);
- bytes = SocketWrite(fd, b, 0, len);
- }
+ {
+ byte[] b = new byte [len];
+ src.get (b, 0, len);
+ bytes = SocketWrite (fd, b, 0, len);
+ }
return bytes;
}
diff --git a/java/nio/ByteBuffer.java b/java/nio/ByteBuffer.java
index ec494b816..6c3546984 100644
--- a/java/nio/ByteBuffer.java
+++ b/java/nio/ByteBuffer.java
@@ -35,9 +35,8 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-package java.nio;
-import gnu.java.nio.ByteBufferImpl;
+package java.nio;
/**
* @since 1.4
@@ -47,16 +46,16 @@ public abstract class ByteBuffer extends Buffer
{
private ByteOrder endian = ByteOrder.BIG_ENDIAN;
- protected int array_offset;
- protected byte[] backing_buffer;
-
+ int array_offset;
+ byte[] backing_buffer;
+
protected ByteBuffer (int capacity, int limit, int position, int mark)
{
super (capacity, limit, position, mark);
array_offset = 0;
}
- protected ByteBuffer (byte[] buffer, int offset, int capacity, int limit, int position, int mark)
+ ByteBuffer (byte[] buffer, int offset, int capacity, int limit, int position, int mark)
{
super (capacity, limit, position, mark);
this.backing_buffer = buffer;
diff --git a/gnu/java/nio/ByteBufferImpl.java b/java/nio/ByteBufferImpl.java
index 64ea66ced..4642288e7 100644
--- a/gnu/java/nio/ByteBufferImpl.java
+++ b/java/nio/ByteBufferImpl.java
@@ -36,16 +36,7 @@ obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-package gnu.java.nio;
-
-import java.nio.ByteBuffer;
-import java.nio.CharBuffer;
-import java.nio.DoubleBuffer;
-import java.nio.FloatBuffer;
-import java.nio.IntBuffer;
-import java.nio.LongBuffer;
-import java.nio.ReadOnlyBufferException;
-import java.nio.ShortBuffer;
+package java.nio;
/**
* This is a Heap memory implementation
@@ -54,12 +45,12 @@ public final class ByteBufferImpl extends ByteBuffer
{
private boolean readOnly;
- public ByteBufferImpl (int capacity)
+ ByteBufferImpl (int capacity)
{
this (new byte [capacity], 0, capacity, capacity, 0, -1, false);
}
- public ByteBufferImpl (byte[] buffer, int offset, int capacity, int limit, int position, int mark, boolean readOnly)
+ ByteBufferImpl (byte[] buffer, int offset, int capacity, int limit, int position, int mark, boolean readOnly)
{
super (buffer, offset, capacity, limit, position, mark);
this.readOnly = readOnly;
@@ -67,32 +58,32 @@ public final class ByteBufferImpl extends ByteBuffer
public CharBuffer asCharBuffer ()
{
- throw new Error ("Not implemented");
+ return new CharViewBufferImpl (this, position (), remaining(), remaining (), 0, -1, isReadOnly ());
}
public ShortBuffer asShortBuffer ()
{
- throw new Error ("Not implemented");
+ return new ShortViewBufferImpl (this, position (), remaining(), remaining (), 0, -1, isReadOnly ());
}
public IntBuffer asIntBuffer ()
{
- throw new Error ("Not implemented");
+ return new IntViewBufferImpl (this, position (), remaining(), remaining (), 0, -1, isReadOnly ());
}
public LongBuffer asLongBuffer ()
{
- throw new Error ("Not implemented");
+ return new LongViewBufferImpl (this, position (), remaining(), remaining (), 0, -1, isReadOnly ());
}
public FloatBuffer asFloatBuffer ()
{
- throw new Error ("Not implemented");
+ return new FloatViewBufferImpl (this, position (), remaining(), remaining (), 0, -1, isReadOnly ());
}
public DoubleBuffer asDoubleBuffer ()
{
- throw new Error ("Not implemented");
+ return new DoubleViewBufferImpl (this, position (), remaining(), remaining (), 0, -1, isReadOnly ());
}
public boolean isReadOnly ()
diff --git a/java/nio/CharBuffer.java b/java/nio/CharBuffer.java
index 9b45ce810..d1ffa2192 100644
--- a/java/nio/CharBuffer.java
+++ b/java/nio/CharBuffer.java
@@ -35,9 +35,8 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-package java.nio;
-import gnu.java.nio.CharBufferImpl;
+package java.nio;
/**
* @since 1.4
@@ -45,8 +44,8 @@ import gnu.java.nio.CharBufferImpl;
public abstract class CharBuffer extends Buffer
implements Comparable, CharSequence
{
- protected int array_offset = 0;
- protected char [] backing_buffer;
+ int array_offset;
+ char[] backing_buffer;
protected CharBuffer (int capacity, int limit, int position, int mark)
{
@@ -54,7 +53,7 @@ public abstract class CharBuffer extends Buffer
array_offset = 0;
}
- protected CharBuffer (char[] buffer, int offset, int capacity, int limit, int position, int mark)
+ CharBuffer (char[] buffer, int offset, int capacity, int limit, int position, int mark)
{
super (capacity, limit, position, mark);
this.backing_buffer = buffer;
diff --git a/gnu/java/nio/CharBufferImpl.java b/java/nio/CharBufferImpl.java
index 2bc8d7d83..708ab403f 100644
--- a/gnu/java/nio/CharBufferImpl.java
+++ b/java/nio/CharBufferImpl.java
@@ -36,12 +36,7 @@ obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-package gnu.java.nio;
-
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.nio.CharBuffer;
-import java.nio.ReadOnlyBufferException;
+package java.nio;
/**
* This is a Heap memory implementation
@@ -50,12 +45,12 @@ public final class CharBufferImpl extends CharBuffer
{
private boolean readOnly;
- public CharBufferImpl (int capacity)
+ CharBufferImpl (int capacity)
{
this (new char [capacity], 0, capacity, capacity, 0, -1, false);
}
- public CharBufferImpl (char[] buffer, int offset, int capacity, int limit, int position, int mark, boolean readOnly)
+ CharBufferImpl (char[] buffer, int offset, int capacity, int limit, int position, int mark, boolean readOnly)
{
super (buffer, offset, capacity, limit, position, mark);
this.readOnly = readOnly;
diff --git a/java/nio/DoubleBuffer.java b/java/nio/DoubleBuffer.java
index a8f01678e..66e60e5b9 100644
--- a/java/nio/DoubleBuffer.java
+++ b/java/nio/DoubleBuffer.java
@@ -35,9 +35,8 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-package java.nio;
-import gnu.java.nio.DoubleBufferImpl;
+package java.nio;
/**
* @since 1.4
@@ -45,8 +44,8 @@ import gnu.java.nio.DoubleBufferImpl;
public abstract class DoubleBuffer extends Buffer
implements Comparable
{
- protected int array_offset;
- protected double [] backing_buffer;
+ int array_offset;
+ double[] backing_buffer;
protected DoubleBuffer (int capacity, int limit, int position, int mark)
{
@@ -54,7 +53,7 @@ public abstract class DoubleBuffer extends Buffer
array_offset = 0;
}
- protected DoubleBuffer (double[] buffer, int offset, int capacity, int limit, int position, int mark)
+ DoubleBuffer (double[] buffer, int offset, int capacity, int limit, int position, int mark)
{
super (capacity, limit, position, mark);
this.backing_buffer = buffer;
diff --git a/gnu/java/nio/DoubleBufferImpl.java b/java/nio/DoubleBufferImpl.java
index 7bd676528..dbc63bbad 100644
--- a/gnu/java/nio/DoubleBufferImpl.java
+++ b/java/nio/DoubleBufferImpl.java
@@ -36,12 +36,7 @@ obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-package gnu.java.nio;
-
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.nio.DoubleBuffer;
-import java.nio.ReadOnlyBufferException;
+package java.nio;
/**
* This is a Heap memory implementation
@@ -50,12 +45,12 @@ public final class DoubleBufferImpl extends DoubleBuffer
{
private boolean readOnly;
- public DoubleBufferImpl (int capacity)
+ DoubleBufferImpl (int capacity)
{
this (new double [capacity], 0, capacity, capacity, 0, -1, false);
}
- public DoubleBufferImpl (double[] buffer, int offset, int capacity, int limit, int position, int mark, boolean readOnly)
+ DoubleBufferImpl (double[] buffer, int offset, int capacity, int limit, int position, int mark, boolean readOnly)
{
super (buffer, offset, capacity, limit, position, mark);
this.readOnly = readOnly;
diff --git a/java/nio/FloatBuffer.java b/java/nio/FloatBuffer.java
index 198bb6f1a..7eb765b00 100644
--- a/java/nio/FloatBuffer.java
+++ b/java/nio/FloatBuffer.java
@@ -35,9 +35,8 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-package java.nio;
-import gnu.java.nio.FloatBufferImpl;
+package java.nio;
/**
* @since 1.4
@@ -45,8 +44,8 @@ import gnu.java.nio.FloatBufferImpl;
public abstract class FloatBuffer extends Buffer
implements Comparable
{
- protected int array_offset;
- protected float [] backing_buffer;
+ int array_offset;
+ float[] backing_buffer;
protected FloatBuffer (int capacity, int limit, int position, int mark)
{
@@ -54,7 +53,7 @@ public abstract class FloatBuffer extends Buffer
array_offset = 0;
}
- protected FloatBuffer (float[] buffer, int offset, int capacity, int limit, int position, int mark)
+ FloatBuffer (float[] buffer, int offset, int capacity, int limit, int position, int mark)
{
super (capacity, limit, position, mark);
this.backing_buffer = buffer;
diff --git a/gnu/java/nio/FloatBufferImpl.java b/java/nio/FloatBufferImpl.java
index 66f8a0d47..93dd1d0b3 100644
--- a/gnu/java/nio/FloatBufferImpl.java
+++ b/java/nio/FloatBufferImpl.java
@@ -36,12 +36,7 @@ obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-package gnu.java.nio;
-
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.nio.FloatBuffer;
-import java.nio.ReadOnlyBufferException;
+package java.nio;
/**
* This is a Heap memory implementation
@@ -50,12 +45,12 @@ public final class FloatBufferImpl extends FloatBuffer
{
private boolean readOnly;
- public FloatBufferImpl (int capacity)
+ FloatBufferImpl (int capacity)
{
this (new float [capacity], 0, capacity, capacity, 0, -1, false);
}
- public FloatBufferImpl (float[] buffer, int offset, int capacity, int limit, int position, int mark, boolean readOnly)
+ FloatBufferImpl (float[] buffer, int offset, int capacity, int limit, int position, int mark, boolean readOnly)
{
super (buffer, offset, capacity, limit, position, mark);
this.readOnly = readOnly;
diff --git a/java/nio/IntBuffer.java b/java/nio/IntBuffer.java
index 377560b00..f6c3252ba 100644
--- a/java/nio/IntBuffer.java
+++ b/java/nio/IntBuffer.java
@@ -35,9 +35,8 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-package java.nio;
-import gnu.java.nio.IntBufferImpl;
+package java.nio;
/**
* @since 1.4
@@ -45,8 +44,8 @@ import gnu.java.nio.IntBufferImpl;
public abstract class IntBuffer extends Buffer
implements Comparable
{
- protected int array_offset;
- protected int [] backing_buffer;
+ int array_offset;
+ int[] backing_buffer;
protected IntBuffer (int capacity, int limit, int position, int mark)
{
@@ -54,7 +53,7 @@ public abstract class IntBuffer extends Buffer
array_offset = 0;
}
- protected IntBuffer (int[] buffer, int offset, int capacity, int limit, int position, int mark)
+ IntBuffer (int[] buffer, int offset, int capacity, int limit, int position, int mark)
{
super (capacity, limit, position, mark);
this.backing_buffer = buffer;
diff --git a/gnu/java/nio/IntBufferImpl.java b/java/nio/IntBufferImpl.java
index beccb276e..ebf33ecbc 100644
--- a/gnu/java/nio/IntBufferImpl.java
+++ b/java/nio/IntBufferImpl.java
@@ -36,12 +36,7 @@ obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-package gnu.java.nio;
-
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.nio.IntBuffer;
-import java.nio.ReadOnlyBufferException;
+package java.nio;
/**
* This is a Heap memory implementation
@@ -50,12 +45,12 @@ public final class IntBufferImpl extends IntBuffer
{
private boolean readOnly;
- public IntBufferImpl (int capacity)
+ IntBufferImpl (int capacity)
{
this (new int [capacity], 0, capacity, capacity, 0, -1, false);
}
- public IntBufferImpl (int[] buffer, int offset, int capacity, int limit, int position, int mark, boolean readOnly)
+ IntBufferImpl (int[] buffer, int offset, int capacity, int limit, int position, int mark, boolean readOnly)
{
super (buffer, offset, capacity, limit, position, mark);
this.readOnly = readOnly;
diff --git a/java/nio/LongBuffer.java b/java/nio/LongBuffer.java
index fd4bfe1f2..67f390688 100644
--- a/java/nio/LongBuffer.java
+++ b/java/nio/LongBuffer.java
@@ -35,9 +35,8 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-package java.nio;
-import gnu.java.nio.LongBufferImpl;
+package java.nio;
/**
* @since 1.4
@@ -45,8 +44,8 @@ import gnu.java.nio.LongBufferImpl;
public abstract class LongBuffer extends Buffer
implements Comparable
{
- protected int array_offset;
- protected long [] backing_buffer;
+ int array_offset;
+ long[] backing_buffer;
protected LongBuffer (int capacity, int limit, int position, int mark)
{
@@ -54,7 +53,7 @@ public abstract class LongBuffer extends Buffer
array_offset = 0;
}
- protected LongBuffer (long[] buffer, int offset, int capacity, int limit, int position, int mark)
+ LongBuffer (long[] buffer, int offset, int capacity, int limit, int position, int mark)
{
super (capacity, limit, position, mark);
this.backing_buffer = buffer;
diff --git a/gnu/java/nio/LongBufferImpl.java b/java/nio/LongBufferImpl.java
index de8168b61..08d4ac548 100644
--- a/gnu/java/nio/LongBufferImpl.java
+++ b/java/nio/LongBufferImpl.java
@@ -36,12 +36,7 @@ obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-package gnu.java.nio;
-
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.nio.LongBuffer;
-import java.nio.ReadOnlyBufferException;
+package java.nio;
/**
* This is a Heap memory implementation
@@ -50,12 +45,12 @@ public final class LongBufferImpl extends LongBuffer
{
private boolean readOnly;
- public LongBufferImpl (int capacity)
+ LongBufferImpl (int capacity)
{
this (new long [capacity], 0, capacity, capacity, 0, -1, false);
}
- public LongBufferImpl (long[] buffer, int offset, int capacity, int limit, int position, int mark, boolean readOnly)
+ LongBufferImpl (long[] buffer, int offset, int capacity, int limit, int position, int mark, boolean readOnly)
{
super (buffer, offset, capacity, limit, position, mark);
this.readOnly = readOnly;
diff --git a/java/nio/Makefile.am b/java/nio/Makefile.am
index d715eec2b..5adb4f51a 100644
--- a/java/nio/Makefile.am
+++ b/java/nio/Makefile.am
@@ -5,22 +5,29 @@ Buffer.java \
BufferOverflowException.java \
BufferUnderflowException.java \
ByteBuffer.java \
+ByteBufferImpl.java \
ByteOrder.java \
CharBuffer.java \
+CharBufferImpl.java \
CharViewBuffer.java \
DirectByteBufferImpl.java \
DoubleBuffer.java \
+DoubleBufferImpl.java \
DoubleViewBuffer.java \
FloatBuffer.java \
+FloatBufferImpl.java \
FloatViewBuffer.java \
IntBuffer.java \
+IntBufferImpl.java \
IntViewBuffer.java \
InvalidMarkException.java \
LongBuffer.java \
+LongBufferImpl.java \
LongViewBuffer.java \
MappedByteBuffer.java \
ReadOnlyBufferException.java \
ShortBuffer.java \
+ShortBufferImpl.java \
ShortViewBuffer.java \
package.html
diff --git a/java/nio/ShortBuffer.java b/java/nio/ShortBuffer.java
index 3c248d9eb..25a1f220c 100644
--- a/java/nio/ShortBuffer.java
+++ b/java/nio/ShortBuffer.java
@@ -35,9 +35,8 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-package java.nio;
-import gnu.java.nio.ShortBufferImpl;
+package java.nio;
/**
* @since 1.4
@@ -45,8 +44,8 @@ import gnu.java.nio.ShortBufferImpl;
public abstract class ShortBuffer extends Buffer
implements Comparable
{
- protected int array_offset;
- protected short [] backing_buffer;
+ int array_offset;
+ short[] backing_buffer;
protected ShortBuffer (int capacity, int limit, int position, int mark)
{
@@ -54,7 +53,7 @@ public abstract class ShortBuffer extends Buffer
array_offset = 0;
}
- protected ShortBuffer (short[] buffer, int offset, int capacity, int limit, int position, int mark)
+ ShortBuffer (short[] buffer, int offset, int capacity, int limit, int position, int mark)
{
super (capacity, limit, position, mark);
this.backing_buffer = buffer;
diff --git a/gnu/java/nio/ShortBufferImpl.java b/java/nio/ShortBufferImpl.java
index 699a0f11b..fcfbee64f 100644
--- a/gnu/java/nio/ShortBufferImpl.java
+++ b/java/nio/ShortBufferImpl.java
@@ -36,12 +36,7 @@ obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-package gnu.java.nio;
-
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.nio.ShortBuffer;
-import java.nio.ReadOnlyBufferException;
+package java.nio;
/**
* This is a Heap memory implementation
@@ -50,12 +45,12 @@ public final class ShortBufferImpl extends ShortBuffer
{
private boolean readOnly;
- public ShortBufferImpl (int capacity)
+ ShortBufferImpl (int capacity)
{
this (new short [capacity], 0, capacity, capacity, 0, -1, false);
}
- public ShortBufferImpl (short[] buffer, int offset, int capacity, int limit, int position, int mark, boolean readOnly)
+ ShortBufferImpl (short[] buffer, int offset, int capacity, int limit, int position, int mark, boolean readOnly)
{
super (buffer, offset, capacity, limit, position, mark);
this.readOnly = readOnly;