diff options
author | Per Bothner <per@bothner.com> | 2004-02-16 11:54:49 -0800 |
---|---|---|
committer | Per Bothner <bothner@gcc.gnu.org> | 2004-02-16 11:54:49 -0800 |
commit | 5693912a7d109bb281efb8bf2ce107a6b516fc1f (patch) | |
tree | 27a478c335b8222aff1ffd69e6d9692486bc95ec /libjava/java/nio/LongViewBufferImpl.java | |
parent | cf68bacaadccff4197ad92016c58c07c7c37f9c0 (diff) | |
download | gcc-5693912a7d109bb281efb8bf2ce107a6b516fc1f.zip gcc-5693912a7d109bb281efb8bf2ce107a6b516fc1f.tar.gz gcc-5693912a7d109bb281efb8bf2ce107a6b516fc1f.tar.bz2 |
CharViewBufferImpl.java: New convenience constructor.
* 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.
From-SVN: r77917
Diffstat (limited to 'libjava/java/nio/LongViewBufferImpl.java')
-rw-r--r-- | libjava/java/nio/LongViewBufferImpl.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/libjava/java/nio/LongViewBufferImpl.java b/libjava/java/nio/LongViewBufferImpl.java index a405ec8..9765de9 100644 --- a/libjava/java/nio/LongViewBufferImpl.java +++ b/libjava/java/nio/LongViewBufferImpl.java @@ -46,11 +46,20 @@ class LongViewBufferImpl extends LongBuffer 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; |