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