org.apache.directory.server.core.partition.impl.btree.jdbm
Class StringSerializer

java.lang.Object
  extended by org.apache.directory.server.core.partition.impl.btree.jdbm.StringSerializer
All Implemented Interfaces:
java.io.Serializable, Serializer

public class StringSerializer
extends java.lang.Object
implements Serializer

A custom String serializer to [de]serialize Strings.

Version:
$Rev$, $Date$
Author:
Apache Directory Project
See Also:
Serialized Form

Constructor Summary
StringSerializer()
           
 
Method Summary
 java.lang.Object deserialize(byte[] bites)
          Deserialize the content of an object from a byte array.
 byte[] serialize(java.lang.Object str)
          Serialize the content of an object into a byte array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringSerializer

public StringSerializer()
Method Detail

deserialize

public java.lang.Object deserialize(byte[] bites)
                             throws java.io.IOException
Description copied from interface: Serializer
Deserialize the content of an object from a byte array.

Specified by:
deserialize in interface Serializer
Parameters:
bites - Byte array representation of the object
Returns:
deserialized object
Throws:
java.io.IOException

serialize

public byte[] serialize(java.lang.Object str)
                 throws java.io.IOException
Description copied from interface: Serializer
Serialize the content of an object into a byte array.

Specified by:
serialize in interface Serializer
Parameters:
str - Object to serialize
Returns:
a byte array representing the object's state
Throws:
java.io.IOException


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.