Serializers based on cedarsoft Serialization can be called using streams.
A typical call to serialize the objects will look like this:
BusinessObject businessObject = ...; //The stream the serialized object is written to (e.g. a FileOutputStream) OutputStream out = ... //just instantiate a new serializer or let it be injected BusinessObjectSerializer serializer = new BusinessObjectSerializer(...); serializer.serialize( businessObject, out); out.close();
Deserializing an object might look like that:
//The stream that provides the serialized object (e.g. a FileInputStream) InputStream in = ... //just instantiate a new serializer (or let it be injected) BusinessObjectSerializer serializer = new BusinessObjectSerializer(...); BusinessObject businessObject = serializer.deserialize( in); in.close();