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