Skip to end of metadata
Go to start of metadata

It is easy to dive right in to using JBoss Marshalling, especially if you are already familiar with standard Java Serialization. The principles are largely the same, though the actual types involved are different. On the write side, you use the Marshaller interface, and on the read side you use the Unmarshaller interface.

Here's an example of writing an object to a file:

This example creates the marshaller and writes a simple string object. To read the object back, we reverse the process:

Note that we don't have to set the version, as it is read from the stream.

This is just a trivial example which should serve as a quick start to understanding the API; it does not exercise the advanced features of JBoss Marshalling which are described in this manual.

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.