Save This Page
Home » pentaho-reporting-engine-classic-0.8.10 » org » jfree » report » util » [javadoc | source]
org.jfree.report.util
public class: SerializerHelper [javadoc | source]
java.lang.Object
   org.jfree.report.util.SerializerHelper
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.
Constructor:
 protected SerializerHelper() 
Method from org.jfree.report.util.SerializerHelper Summary:
getComparator,   getInstance,   getMethods,   getSerializer,   getSuperClassObjectDescription,   readObject,   registerMethod,   setInstance,   unregisterMethod,   writeObject
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jfree.report.util.SerializerHelper Detail:
 protected ClassComparator getComparator() 
    Returns the class comparator instance used to find correct super classes.
 public static synchronized SerializerHelper getInstance() 
    Returns or creates a new SerializerHelper. When a new instance is created by this method, all known SerializeMethods are registered.
 protected HashMap getMethods() 
    Returns the collection of all registered serialize methods.
 protected SerializeMethod getSerializer(Class c) 
    Looks up the SerializeMethod for the given class or null if there is no SerializeMethod for the given class.
 protected SerializeMethod getSuperClassObjectDescription(Class d,
    SerializeMethod knownSuperClass) 
    Looks up the SerializeMethod for the given class or null if there is no SerializeMethod for the given class. This method searches all superclasses.
 public Object readObject(ObjectInputStream in) throws ClassNotFoundException, IOException 
    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.

 public  void registerMethod(SerializeMethod method) 
    Registers a new SerializeMethod with this SerializerHelper.
 protected static  void setInstance(SerializerHelper helper) 
    This method can be used to replace the singleton instance of this helper.
 public  void unregisterMethod(SerializeMethod method) 
    Deregisters a new SerializeMethod with this SerializerHelper.
 public  void writeObject(Object o,
    ObjectOutputStream out) throws IOException 
    Writes a serializable object description to the given object output stream. This method selects the best serialize helper method for the given object.