org.pentaho.reporting.engine.classic.core.util.serializers
Class BandLayoutManagerSerializer

java.lang.Object
  extended by org.pentaho.reporting.engine.classic.core.util.serializers.BandLayoutManagerSerializer
All Implemented Interfaces:
org.pentaho.reporting.libraries.serializer.SerializeMethod

public class BandLayoutManagerSerializer
extends Object
implements org.pentaho.reporting.libraries.serializer.SerializeMethod

A SerializeMethod implementation that handles BandLayoutManagers.

Author:
Thomas Morgner
See Also:
BandLayoutManager

Constructor Summary
BandLayoutManagerSerializer()
          Default Constructor.
 
Method Summary
 Class getObjectClass()
          The class of the object, which this object can serialize.
 Object readObject(ObjectInputStream in)
          Reads the object from the object input stream.
 void writeObject(Object o, ObjectOutputStream out)
          Writes a serializable object description to the given object output stream.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BandLayoutManagerSerializer

public BandLayoutManagerSerializer()
Default Constructor.

Method Detail

writeObject

public void writeObject(Object o,
                        ObjectOutputStream out)
                 throws IOException
Writes a serializable object description to the given object output stream. As bandlayoutmanagers need to be instantiable by their default constructor, it is sufficient to write the class of the layout manager.

Specified by:
writeObject in interface org.pentaho.reporting.libraries.serializer.SerializeMethod
Parameters:
o - the to be serialized object.
out - the outputstream that should receive the object.
Throws:
IOException - if an I/O error occured.

readObject

public Object readObject(ObjectInputStream in)
                  throws IOException,
                         ClassNotFoundException
Reads the object from the object input stream. This will read a serialized class name of the BandLayoutManager. The specified class is then instantiated using its default constructor.

Specified by:
readObject in interface org.pentaho.reporting.libraries.serializer.SerializeMethod
Parameters:
in - the object input stream from where to read the serialized data.
Returns:
the generated object.
Throws:
IOException - if reading the stream failed.
ClassNotFoundException - if serialized object class cannot be found.

getObjectClass

public Class getObjectClass()
The class of the object, which this object can serialize.

Specified by:
getObjectClass in interface org.pentaho.reporting.libraries.serializer.SerializeMethod
Returns:
the class org.pentaho.reporting.engine.classic.core.layout.BandLayoutManager.