Fast binary and XML serialisation

Compared to the standard Java serialisation OOMEGA's binary codec SDF (Structured Data Format) reduces the total amount of data to a third and the serialisation/deserialisation process is actually three times faster.

For both binary and XML serialisation corresponding sources and sinks for OOMEGA's streaming API are provided. They are called SDFDecoder and SDFCoder for the binary serialisation and SDMLDecoder and SDMLCoder for the XML serialisation.

To convert from the binary to the XML format, just connect the appropriate coder and decoder with an active pipe.

// create a decoder for the binary format SDF
in = new SDFDecoder(new FileInputStream("persons.sdf"),
  eocSession.getEOC().getClassDirectory());

// create a coder for the XML format
out = new SDMLCoder(new FileOutputStream("persons.xml"));

// connect the decoder and coder with an active pipe
new ActivePipe(out,in).run();

// close the coder
out.close();

By the way - an entity object container can be used as input or output stream as well. Thus it is easy to stream the contents of a SDF or XML file into a database.

>> Show next feature
>> Back to the feature list