|
||||||||||
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.StringSerializer
public static class ByteArrayUtil.StringSerializer
Serializer for String objects
Field Summary | |
---|---|
(package private) Charset |
charset
Character set to use |
(package private) CharsetDecoder |
decoder
Decoder |
(package private) CharsetEncoder |
encoder
Encoder |
Constructor Summary | |
---|---|
protected |
ByteArrayUtil.StringSerializer()
Constructor. |
Method Summary | |
---|---|
String |
fromByteBuffer(ByteBuffer buffer)
Deserialize an object from a byte buffer (e.g. disk) |
int |
getByteSize(String object)
Get the size of the object in bytes. |
void |
toByteBuffer(ByteBuffer buffer,
String 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 |
Field Detail |
---|
Charset charset
CharsetEncoder encoder
CharsetDecoder decoder
Constructor Detail |
---|
protected ByteArrayUtil.StringSerializer()
Method Detail |
---|
public String fromByteBuffer(ByteBuffer buffer)
ByteBufferSerializer
fromByteBuffer
in interface ByteBufferSerializer<String>
buffer
- Data array to process
public void toByteBuffer(ByteBuffer buffer, String obj)
ByteBufferSerializer
toByteBuffer
in interface ByteBufferSerializer<String>
buffer
- Buffer to serialize toobj
- Object to serializepublic int getByteSize(String object)
ByteBufferSerializer
getByteSize
in interface ByteBufferSerializer<String>
object
- Object to serialize
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |