Package com.bubble.serializer

Faster Java Serialization classes.


Interface Summary
Deserializer Interface of the custom deserializers for each class.
Serializer Interface of the custom serializers for each class.

Class Summary
DeserializationContext The DeserializationContext allows Objects and object graphs that were serialized by a SerializationContext to be read from a ByteBuffer.
Generator Generates customized code for serialization.
SerializationContext The SerializationContext allows Objects and object graphs to be written to a ByteBuffer in serialized form.

Exception Summary

Package com.bubble.serializer Description

Faster Java Serialization classes.

The classes in this package enable faster serialization by generating bytecodes on the fly to serialize objects.

When an object is serialized, its class is inspected and a class that implements the Serializer interface is generated. This class is tailor made to serialize the fields of the given object's class directly.

To serialize objects to a ByteBuffer, all you have to do is use the SerializationContext class:

	SerializationContext context = new SerializationContext();
	ByteBuffer buffer = ByteBuffer.allocate(1024);
	context.serialize(myObject, buffer);

Serializes myObject. Note that, in order to be serialized, objects must implement

To reconstruct the object, all you have to do is use the DeserializationContext class:

	DeserializationContext context = new DeserializationContext();
	MyObject reconstructedObject = (MyObject)context.deserialize(buffer);

Reads the reconstructedObject. In the meantime, the data in the ByteBuffer can easily be written to a file or sent through a network using Java NIO.

Faster Java Serialization.
Copyright (C) 2006 Leonardo Bubble Mesquita.