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

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

public class BigIntegerSerializer
extends java.lang.Object
implements Serializer

A custom BigInteger serializer to [de]serialize BigIntegers.

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

Constructor Summary
BigIntegerSerializer()
           
 
Method Summary
 java.lang.Object deserialize(byte[] bigIntBytes)
          Deserialize the content of an object from a byte array.
 byte[] serialize(java.lang.Object bigInt)
          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

BigIntegerSerializer

public BigIntegerSerializer()
Method Detail

deserialize

public java.lang.Object deserialize(byte[] bigIntBytes)
                             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:
bigIntBytes - Byte array representation of the object
Returns:
deserialized object
Throws:
java.io.IOException

serialize

public byte[] serialize(java.lang.Object bigInt)
                 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:
bigInt - 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.