Faster Java Serialization 0.22

Faster Java Serializations goal of the project is to enable faster serialization by generating bytecodes on the fly.
Faster Java Serializations goal of the project is to 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 add jserial.jar to the classpath and 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 java.io.Serializable

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.

This project uses a modified version of Javassist-3.3 to perform code-generation on-the-fly.

Limitations:

Custom serialization through java.io.Externalizable
Custom serialization through writeObject, readObject, writeReplace, readResolve or any other special serialization method.
Inner/Local/Anonymous class serialization.
Serialization of non-static final fields, though no error will arise when serializing objects that have such fields.

last updated on:
October 24th, 2006, 14:14 GMT
price:
FREE!
homepage:
jserial.sourceforge.net
license type:
GPL (GNU General Public License) 
developed by:
Leonardo Mesquita
category:
ROOT \ Programming \ Code Generators
Faster Java Serialization
Download Button

In a hurry? Add it to your Download Basket!

user rating

UNRATED
0.0/5
 

0/5

Rate it!

Add your review!

SUBMIT