jdbm.helper
Class DefaultSerializer
java.lang.Object
jdbm.helper.DefaultSerializer
- All Implemented Interfaces:
- Serializable, Serializer
public class DefaultSerializer
- extends Object
- implements Serializer
Default java serializer.
- Author:
- Alex Boisvert
- See Also:
- Serialized Form
|
Method Summary |
Object |
deserialize(byte[] serialized)
De-serialize the content of an object from a byte array. |
byte[] |
serialize(Object obj)
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 |
INSTANCE
public static final DefaultSerializer INSTANCE
DefaultSerializer
public DefaultSerializer()
- Construct a DefaultSerializer.
serialize
public byte[] serialize(Object obj)
throws IOException
- Serialize the content of an object into a byte array.
- Specified by:
serialize in interface Serializer
- Parameters:
obj - Object to serialize
- Returns:
- a byte array representing the object's state
- Throws:
IOException
deserialize
public Object deserialize(byte[] serialized)
throws IOException
- De-serialize the content of an object from a byte array.
- Specified by:
deserialize in interface Serializer
- Parameters:
serialized - Byte array representation of the object
- Returns:
- de-serialized object
- Throws:
IOException
Copyright © 2003-2012 The Apache Software Foundation. All Rights Reserved.