Serializers

Serializers do the work of saving and retrieving objects from persistant store. They hide the details of how this happens; once a serializer has been set up, clients merely store objects to it, then close it; once a deserializer has been set up, clients merely retrieve objects from it, then close it.

Binary serialization

We use the binary serialization provided by the java core libraries for most tasks. The org.jcon.persistance.LookupInputStream and org.jcon.persistance.LookupOutputStream classes provide implementations that add the ability to store external references.

Text serialization

For text-based, human-understandable persistance, we use a format called Text Object Format (TOF). This format has most of the needed features for persistance - internal and external references, object definitions for common data types and a few specialized ones.

Disadvantages in the current implementation include size, and the lack of any ability to save the class definition. Currently no real method to handle versioning is implemented. However, being able to write and troubleshoot these with a simple text editor has made the format so useful that I (Paul Reavis) use nothing else in my development.

Here's the BNF for TOF.

Classes providing serialization in TOF are the org.jcon.persistance.TOFReader and org.jcon.persistance.TOFWriter.