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