added get/put float/double to ByteBuffers, as well as duplicate

This commit is contained in:
Luke Wahlmeier
2016-01-10 03:03:03 -07:00
parent c1df8b949c
commit 9d87e3b2a7
7 changed files with 212 additions and 27 deletions

View File

@ -46,6 +46,14 @@ class FixedArrayByteBuffer extends DirectByteBuffer {
return new FixedArrayByteBuffer
(address + position, array, arrayOffset + position, remaining(), true);
}
@Override
public ByteBuffer duplicate() {
ByteBuffer b = new FixedArrayByteBuffer(address, array, arrayOffset, capacity, isReadOnly());
b.limit(this.limit());
b.position(this.position());
return b;
}
public String toString() {
return "(FixedArrayByteBuffer with address: " + address