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