jdbm.helper

## Class LongSerializer

- java.lang.Object
- - jdbm.helper.LongSerializer

All Implemented Interfaces:
  Serializable, Serializer

    public class LongSerializer
    extends Object
    implements Serializer

Optimized serializer for long integers.

Author:
  Alex Boisvert
See Also:
  Serialized Form

### Field Summary

Fields
`static LongSerializer` `INSTANCE`

### Constructor Summary

Constructors
Constructor and Description
`LongSerializer()` Construct a LongSerializer.

### Method Summary

Methods
`Object` `deserialize(byte[] serialized)` Deserialize 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`

### Field Detail

#### INSTANCE

    public static final LongSerializer INSTANCE

### Constructor Detail

#### LongSerializer

    public LongSerializer()

Construct a LongSerializer.

### Method Detail

#### 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

Deserialize the content of an object from a byte array.

Specified by:
  `deserialize` in interface `Serializer`
Parameters:
  `serialized` - Byte array representation of the object
Returns:
  deserialized object
Throws:
  `IOException`