org.apache.camel.component.krati.serializer
Class KratiDefaultSerializer<T extends Serializable>

java.lang.Object
  extended by org.apache.camel.component.krati.serializer.KratiDefaultSerializer<T>
All Implemented Interfaces:
krati.io.Serializer<T>

public class KratiDefaultSerializer<T extends Serializable>
extends Object
implements krati.io.Serializer<T>


Constructor Summary
KratiDefaultSerializer()
           
 
Method Summary
 T deserialize(byte[] binary)
          Deserialize an object from its raw bytes generated by {Serializer.serialize(Object).
 byte[] serialize(T object)
          Serialize 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

KratiDefaultSerializer

public KratiDefaultSerializer()
Method Detail

serialize

public byte[] serialize(T object)
                 throws krati.io.SerializationException
Serialize an object into a byte array.

Specified by:
serialize in interface krati.io.Serializer<T extends Serializable>
Parameters:
object - - an object to be serialized by this Serializer.
Returns:
a byte array which is the raw representation of an object.
Throws:
krati.io.SerializationException

deserialize

public T deserialize(byte[] binary)
                                   throws krati.io.SerializationException
Deserialize an object from its raw bytes generated by {Serializer.serialize(Object).

Specified by:
deserialize in interface krati.io.Serializer<T extends Serializable>
Parameters:
binary - - the raw bytes from which an object is constructed.
Returns:
an object constructed from the raw bytes.
Throws:
krati.io.SerializationException - if the object cannot be constructed from the raw bytes.


Apache Camel