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