mirror of
https://github.com/corda/corda.git
synced 2025-06-18 15:18:16 +00:00
Implemented ByteBuffer.clear()
This commit is contained in:
@ -27,6 +27,12 @@ public class ByteBuffer {
|
|||||||
return array;
|
return array;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ByteBuffer clear() {
|
||||||
|
position = 0;
|
||||||
|
limit = capacity;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public ByteBuffer slice() {
|
public ByteBuffer slice() {
|
||||||
ByteBuffer buf = new ByteBuffer(array);
|
ByteBuffer buf = new ByteBuffer(array);
|
||||||
buf.arrayOffset = arrayOffset + position;
|
buf.arrayOffset = arrayOffset + position;
|
||||||
|
Reference in New Issue
Block a user