public static class ByteVector.SmallSerializer extends java.lang.Object implements ByteBufferSerializer<ByteVector>
Constructor and Description |
---|
SmallSerializer() |
Modifier and Type | Method and Description |
---|---|
ByteVector |
fromByteBuffer(java.nio.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(java.nio.ByteBuffer buffer,
ByteVector vec)
Serialize the object to a byte array (e.g. disk)
|
public ByteVector fromByteBuffer(java.nio.ByteBuffer buffer) throws java.io.IOException
ByteBufferSerializer
fromByteBuffer
in interface ByteBufferSerializer<ByteVector>
buffer
- Data array to processjava.io.IOException
- on IO errorspublic void toByteBuffer(java.nio.ByteBuffer buffer, ByteVector vec) throws java.io.IOException
ByteBufferSerializer
toByteBuffer
in interface ByteBufferSerializer<ByteVector>
buffer
- Buffer to serialize tovec
- Object to serializejava.io.IOException
- on IO errorspublic int getByteSize(ByteVector vec)
ByteBufferSerializer
getByteSize
in interface ByteBufferSerializer<ByteVector>
vec
- Object to serializeCopyright © 2019 ELKI Development Team. License information.