org.apache.jcs.utils.serialization
Class StandardSerializer

java.lang.Object
  extended by org.apache.jcs.utils.serialization.StandardSerializer
All Implemented Interfaces:
IElementSerializer

public class StandardSerializer
extends Object
implements IElementSerializer

Performs default serialization and de-serialization.

Author:
Aaron Smuts

Constructor Summary
StandardSerializer()
           
 
Method Summary
 Object deSerialize(byte[] data)
          Uses default de-serialization to turn a byte array into an object.
 byte[] serialize(Serializable obj)
          Serializes an object using default serialization.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardSerializer

public StandardSerializer()
Method Detail

serialize

public byte[] serialize(Serializable obj)
                 throws IOException
Serializes an object using default serialization.

Specified by:
serialize in interface IElementSerializer
Parameters:
obj -
Returns:
byte[]
Throws:
IOException

deSerialize

public Object deSerialize(byte[] data)
                   throws IOException,
                          ClassNotFoundException
Uses default de-serialization to turn a byte array into an object. All exceptions are converted into IOExceptions.

Specified by:
deSerialize in interface IElementSerializer
Parameters:
data -
Returns:
Object
Throws:
IOException
ClassNotFoundException


Copyright © 2002-2012 Apache Software Foundation. All Rights Reserved.