public static class ByteArrayUtil.ByteSerializer extends Object implements FixedSizeByteBufferSerializer<Byte>
Modifier | Constructor and Description |
---|---|
protected |
ByteArrayUtil.ByteSerializer()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Byte |
fromByteBuffer(ByteBuffer buffer)
Deserialize an object from a byte buffer (e.g. disk)
|
int |
getByteSize(Byte object)
Get the size of the object in bytes.
|
int |
getFixedByteSize()
Get the fixed size needed by this serializer.
|
void |
toByteBuffer(ByteBuffer buffer,
Byte obj)
Serialize the object to a byte array (e.g. disk)
|
protected ByteArrayUtil.ByteSerializer()
public Byte fromByteBuffer(ByteBuffer buffer)
ByteBufferSerializer
fromByteBuffer
in interface ByteBufferSerializer<Byte>
buffer
- Data array to processpublic void toByteBuffer(ByteBuffer buffer, Byte obj)
ByteBufferSerializer
toByteBuffer
in interface ByteBufferSerializer<Byte>
buffer
- Buffer to serialize toobj
- Object to serializepublic int getByteSize(Byte object)
ByteBufferSerializer
getByteSize
in interface ByteBufferSerializer<Byte>
object
- Object to serializepublic int getFixedByteSize()
FixedSizeByteBufferSerializer
getFixedByteSize
in interface FixedSizeByteBufferSerializer<Byte>