T
- Object type processedpublic interface ByteBufferSerializer<T>
Modifier and Type | Method and Description |
---|---|
T |
fromByteBuffer(java.nio.ByteBuffer buffer)
Deserialize an object from a byte buffer (e.g. disk)
|
int |
getByteSize(T object)
Get the size of the object in bytes.
|
void |
toByteBuffer(java.nio.ByteBuffer buffer,
T object)
Serialize the object to a byte array (e.g. disk)
|
T fromByteBuffer(java.nio.ByteBuffer buffer) throws java.io.IOException, java.lang.UnsupportedOperationException
buffer
- Data array to processjava.io.IOException
- on IO errorsjava.lang.UnsupportedOperationException
- When functionality not implemented or
availablevoid toByteBuffer(java.nio.ByteBuffer buffer, T object) throws java.io.IOException, java.lang.UnsupportedOperationException
buffer
- Buffer to serialize toobject
- Object to serializejava.io.IOException
- on IO errorsjava.lang.UnsupportedOperationException
- When functionality not implemented or
availableint getByteSize(T object) throws java.io.IOException, java.lang.UnsupportedOperationException
object
- Object to serializejava.io.IOException
- on IO errorsjava.lang.UnsupportedOperationException
- When functionality not implemented or
availableCopyright © 2019 ELKI Development Team. License information.