public interface IByteObject
This interface allows a client to optimise the serialization of byte buffers. This may be neccessary to avoid unneccessary copying or creation of byte arrays.
Modifier and Type | Method and Description |
---|---|
java.nio.ByteBuffer |
getByteBuffer()
This method should return a ByteBuffer set to the position to
start writing into it.
|
byte[] |
getBytes()
Return the bytes backing this IByteObject.
|
void |
setByteBuffer(java.nio.ByteBuffer byteBuffer)
Allow the internal storage to be replaced, as it may be reallocated
externally.
|
java.nio.ByteBuffer getByteBuffer() throws java.io.IOException
java.io.IOException
void setByteBuffer(java.nio.ByteBuffer byteBuffer) throws java.io.IOException
java.io.IOException
byte[] getBytes()
Return the bytes backing this IByteObject.