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