com.googlecode.mobilityrpc.serialization.impl
Class KryoSerializer

java.lang.Object
  extended by com.googlecode.mobilityrpc.serialization.impl.KryoSerializer
All Implemented Interfaces:
Serializer

public class KryoSerializer
extends Object
implements Serializer

A serializer which serializes regular Java objects to/from binary using the Kryo serilaization framework.

The advantages of this framework over Java's built-in serialization, are: speed, compact data sizes, and an ability to serialize regular Java objects without requiring them to implement Serializable.

Author:
Niall Gallagher

Constructor Summary
KryoSerializer(ClassLoader classLoader)
           
 
Method Summary
 Object deserialize(byte[] serializedData)
           
 byte[] serialize(Object object)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KryoSerializer

public KryoSerializer(ClassLoader classLoader)
Method Detail

serialize

public byte[] serialize(Object object)
Specified by:
serialize in interface Serializer

deserialize

public Object deserialize(byte[] serializedData)
Specified by:
deserialize in interface Serializer


Copyright © 2012. All Rights Reserved.