public static class ByteVector.SmallSerializer extends Object implements ByteBufferSerializer<ByteVector>
Constructor and Description |
---|
ByteVector.SmallSerializer() |
Modifier and Type | Method and Description |
---|---|
ByteVector |
fromByteBuffer(ByteBuffer buffer)
Deserialize an object from a byte buffer (e.g. disk)
|
int |
getByteSize(ByteVector vec)
Get the size of the object in bytes.
|
void |
toByteBuffer(ByteBuffer buffer,
ByteVector vec)
Serialize the object to a byte array (e.g. disk)
|
public ByteVector fromByteBuffer(ByteBuffer buffer) throws IOException
ByteBufferSerializer
fromByteBuffer
in interface ByteBufferSerializer<ByteVector>
buffer
- Data array to processIOException
- on IO errorspublic void toByteBuffer(ByteBuffer buffer, ByteVector vec) throws IOException
ByteBufferSerializer
toByteBuffer
in interface ByteBufferSerializer<ByteVector>
buffer
- Buffer to serialize tovec
- Object to serializeIOException
- on IO errorspublic int getByteSize(ByteVector vec)
ByteBufferSerializer
getByteSize
in interface ByteBufferSerializer<ByteVector>
vec
- Object to serialize