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

@ -89,4 +89,12 @@ class ArrayByteBuffer extends ByteBuffer {
+ " limit: " + limit
+ " capacity: " + capacity + ")";
}
@Override
public ByteBuffer duplicate() {
ByteBuffer b = new ArrayByteBuffer(array, arrayOffset, capacity, isReadOnly());
b.limit(this.limit());
b.position(this.position());
return b;
}
}