|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.lmu.ifi.dbs.elki.persistent.ByteArrayUtil.VarintSerializer
public static class ByteArrayUtil.VarintSerializer
Serializer for Integer objects using a variable size encoding
Constructor Summary | |
---|---|
protected |
ByteArrayUtil.VarintSerializer()
Constructor. |
Method Summary | |
---|---|
Integer |
fromByteBuffer(ByteBuffer buffer)
Deserialize an object from a byte buffer (e.g. disk) |
int |
getByteSize(Integer object)
Get the size of the object in bytes. |
void |
toByteBuffer(ByteBuffer buffer,
Integer obj)
Serialize the object to a byte array (e.g. disk) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected ByteArrayUtil.VarintSerializer()
Method Detail |
---|
public Integer fromByteBuffer(ByteBuffer buffer)
ByteBufferSerializer
fromByteBuffer
in interface ByteBufferSerializer<Integer>
buffer
- Data array to process
public void toByteBuffer(ByteBuffer buffer, Integer obj)
ByteBufferSerializer
toByteBuffer
in interface ByteBufferSerializer<Integer>
buffer
- Buffer to serialize toobj
- Object to serializepublic int getByteSize(Integer object)
ByteBufferSerializer
getByteSize
in interface ByteBufferSerializer<Integer>
object
- Object to serialize
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |