Project Home JavaDoc API Downloads Mailing List Featured
Java Container - sandbox on demand as easy as it can get
POJO State - observe everything everywhere
Fikin Ant Tasks - a directory of wonderful libraries
Search:
Donate to this project Statistics of this project RSS feeds of this project |
Class MarshalingThis library allows Java objects to be serialized together with their class information. This way they can be de-serialized in an environment where their class information might not be originally present.
All source code is released under :
Apache License V2
Latest release and changes :
WHATSNEW
Installation instructions :
INSTALL
If you feel generous, donate and be honored forever :
Donate
If you feel like business, sign up a maintenance contract and be privileged :
Sign-Up
If you feel cool, buy a t-shirt and make a statement :
T-shirt
If you feel like hacking, send me a patch :
Submit patch
If you feel nothing like it don't panic, drink water and hangover will soon be over
Using Java Serialization API one can serialize an object into a stream.
Using same API one can later on de-serialize the object from the stream.
Upon de-serialization one has to have the class information available to the default classloader. But what if because of some reason, these classes (or jars) are not present in the environment? For example, in cluster environment where a distributed computing happens for objects (aka. jobs) implemented by some 3rd party, remote nodes cannot possibly know about their exact implementation classes. Another situation is when one has to read unknown objects from some media and do not have the original environment available.
In all these cases, the solution would be to store needed class information
together with the actual object data.
Fortunately Java Serialization API has the means to do that.
This library wraps all this complexity in an easy to use manner. Further on, it has a well defined configuration API which can be used to tailor the solution. Using the library is rather simple:
would serialize myObj together with no classes
(due to NullClassSelector ).There are several other ClassSelector implementation available in
net.sf.fikin.classmarshaling.util package.De-serialization is equally easy:
One of the main questions to answer is, which classes have to be serialized together
with the object and which can be safely assumed to be present in the environment later on.
©2006-2009 Nikolay Fiykov
|