The SerializeHelper is used to make implementing custom serialization handlers easier.
Handlers for certain object types need to be added to this helper before this
implementation is usable.
author: Thomas Morgner
getSerializer(Class c) Looks up the SerializeMethod for the given class or null if there is no
SerializeMethod for the given class.
Parameters: c - the class for which we want to lookup a serialize method.
Returns or creates a new SerializerHelper. When a new instance is created by this
method, all known SerializeMethods are registered.
the SerializerHelper singleton instance.
Looks up the SerializeMethod for the given class or null if there is no
SerializeMethod for the given class.
Parameters: c - the class for which we want to lookup a serialize method. the method or null, if there is no registered method for the class.
Looks up the SerializeMethod for the given class or null if there is no
SerializeMethod for the given class. This method searches all superclasses.
Parameters: d - the class for which we want to lookup a serialize method. Parameters: knownSuperClass - the known super class, if any or null. the method or null, if there is no registered method for the class.
Reads the object from the object input stream. This object selects the best
serializer to read the object.
Make sure, that you use the same configuration (library and class versions,
registered methods in the SerializerHelper) for reading as you used for writing.
Parameters: in - the object input stream from where to read the serialized data. the generated object. throws: IOException - if reading the stream failed. throws: ClassNotFoundException - if serialized object class cannot be found.
Writes a serializable object description to the given object output stream. This
method selects the best serialize helper method for the given object.
Parameters: o - the to be serialized object. Parameters: out - the outputstream that should receive the object. throws: IOException - if an I/O error occured.