* java/nio/IntBuffer.java: Likewise.
* java/nio/LongBuffer.java: Likewise.
* java/nio/ShortBuffer.java: Likewise.
+ * java/nio/CharViewBufferImpl.java: New convenience constructor.
+ Fix buggy call to super constructor.
+ * java/nio/DoubleViewBufferImpl.java: Likewise.
+ * java/nio/FloatViewBufferImpl.java: Likewise.
+ * java/nio/IntViewBufferImpl.java: Likewise.
+ * java/nio/LongViewBufferImpl.java: Likewise.
+ * java/nio/ShortViewBufferImpl.java: Likewise.
2004-02-15 Ito Kazumitsu <kaz@maczuka.gcd.org>
private boolean readOnly;
private ByteOrder endian;
+ CharViewBufferImpl (ByteBuffer bb, int capacity)
+ {
+ super (capacity, capacity, 0, -1);
+ this.bb = bb;
+ this.offset = bb.position();
+ this.readOnly = bb.isReadOnly();
+ this.endian = bb.order();
+ }
+
public CharViewBufferImpl (ByteBuffer bb, int offset, int capacity,
int limit, int position, int mark,
boolean readOnly, ByteOrder endian)
{
- super (limit >> 1, limit >> 1, position >> 1, mark >> 1);
+ super (capacity, limit, position, mark);
this.bb = bb;
this.offset = offset;
this.readOnly = readOnly;
private boolean readOnly;
private ByteOrder endian;
+ DoubleViewBufferImpl (ByteBuffer bb, int capacity)
+ {
+ super (capacity, capacity, 0, -1);
+ this.bb = bb;
+ this.offset = bb.position();
+ this.readOnly = bb.isReadOnly();
+ this.endian = bb.order();
+ }
+
public DoubleViewBufferImpl (ByteBuffer bb, int offset, int capacity,
int limit, int position, int mark,
boolean readOnly, ByteOrder endian)
{
- super (limit >> 3, limit >> 3, position >> 3, mark >> 3);
+ super (capacity, limit, position, mark);
this.bb = bb;
this.offset = offset;
this.readOnly = readOnly;
private boolean readOnly;
private ByteOrder endian;
+ FloatViewBufferImpl (ByteBuffer bb, int capacity)
+ {
+ super (capacity, capacity, 0, -1);
+ this.bb = bb;
+ this.offset = bb.position();
+ this.readOnly = bb.isReadOnly();
+ this.endian = bb.order();
+ }
+
public FloatViewBufferImpl (ByteBuffer bb, int offset, int capacity,
int limit, int position, int mark,
boolean readOnly, ByteOrder endian)
{
- super (limit >> 2, limit >> 2, position >> 2, mark >> 2);
+ super (capacity, limit, position, mark);
this.bb = bb;
this.offset = offset;
this.readOnly = readOnly;
private boolean readOnly;
private ByteOrder endian;
+ IntViewBufferImpl (ByteBuffer bb, int capacity)
+ {
+ super (capacity, capacity, 0, -1);
+ this.bb = bb;
+ this.offset = bb.position();
+ this.readOnly = bb.isReadOnly();
+ this.endian = bb.order();
+ }
+
public IntViewBufferImpl (ByteBuffer bb, int offset, int capacity,
int limit, int position, int mark,
boolean readOnly, ByteOrder endian)
{
- super (limit >> 2, limit >> 2, position >> 2, mark >> 2);
+ super (capacity, limit, position, mark);
this.bb = bb;
this.offset = offset;
this.readOnly = readOnly;
private boolean readOnly;
private ByteOrder endian;
+ LongViewBufferImpl (ByteBuffer bb, int capacity)
+ {
+ super (capacity, capacity, 0, -1);
+ this.bb = bb;
+ this.offset = bb.position();
+ this.readOnly = bb.isReadOnly();
+ this.endian = bb.order();
+ }
+
public LongViewBufferImpl (ByteBuffer bb, int offset, int capacity,
int limit, int position, int mark,
boolean readOnly, ByteOrder endian)
{
- super (limit >> 3, limit >> 3, position >> 3, mark >> 3);
+ super (capacity, limit, position, mark);
this.bb = bb;
this.offset = offset;
this.readOnly = readOnly;
private ByteBuffer bb;
private boolean readOnly;
private ByteOrder endian;
+
+ ShortViewBufferImpl (ByteBuffer bb, int capacity)
+ {
+ super (capacity, capacity, 0, -1);
+ this.bb = bb;
+ this.offset = bb.position();
+ this.readOnly = bb.isReadOnly();
+ this.endian = bb.order();
+ }
public ShortViewBufferImpl (ByteBuffer bb, int offset, int capacity,
int limit, int position, int mark,
boolean readOnly, ByteOrder endian)
{
- super (limit >> 1, limit >> 1, position >> 1, mark >> 1);
+ super (capacity, limit, position, mark);
this.bb = bb;
this.offset = offset;
this.readOnly = readOnly;