| java.lang.Object workbench.util.ByteBuffer
ByteBuffer | public class ByteBuffer (Code) | | A dynamic byte[] array which gives direct access to the underlying
byte[] array which is more efficient than ByteArrayOutputStream which
copies the array when calling toByteArray() (thus doubling memory usage)
It is not as efficient as it does not pre-allocate bytes (in order to
be able to give direct access to the underlying array.
ByteBuffer.getLength() returns the physical length of the internal array
and is equivalent to getBuffer().length;
|
ByteBuffer | public ByteBuffer()(Code) | | |
getBuffer | public byte[] getBuffer()(Code) | | Returns a reference to the internal buffer.
May be null if append() has never been called.
|
getLength | public int getLength()(Code) | | Returns the current length of this ByteBuffer.
This is equivalent to getBuffer().length
|
|
|