BufferTools
Value members
Concrete methods
Allocate a new ByteBuffer
on the heap
Allocate a new ByteBuffer
on the heap
- Value Params
- size
size of desired
ByteBuffer
Check the array of buffers to ensure they are all empty
Check the array of buffers to ensure they are all empty
- Value Params
- buffers
ByteBuffer
s to check for data
- Returns
true if they are empty, false if there is data remaining
Check the array of buffers to ensure they are all empty
Check the array of buffers to ensure they are all empty
- Value Params
- buffers
ByteBuffer
s to check for data
- Returns
true if they are empty, false if there is data remaining
Join the two buffers into a single ByteBuffer. This method is guaranteed to return a ByteBuffer, but it may be empty.
Join the two buffers into a single ByteBuffer. This method is guaranteed to return a ByteBuffer, but it may be empty.
Make a copy of the ByteBuffer, depleting the input buffer
Make a copy of the ByteBuffer, depleting the input buffer
Replaces any empty buffers except for the last one with the emptyBuffer
to allow GC of depleted ByteBuffers and returns the index of the first
non-empty ByteBuffer, or the last index, whichever comes first.
Replaces any empty buffers except for the last one with the emptyBuffer
to allow GC of depleted ByteBuffers and returns the index of the first
non-empty ByteBuffer, or the last index, whichever comes first.