org.pentaho.reporting.libraries.serializer.methods

Class Dimension2DSerializer

public class Dimension2DSerializer extends Object implements SerializeMethod

A SerializeMethod implementation that handles Dimension2D objects.

Author: Thomas Morgner

See Also: java.awt.geom.Dimension2D

Constructor Summary
Dimension2DSerializer()
Default Constructor.
Method Summary
ClassgetObjectClass()
Returns the class of the object, which this object can serialize.
ObjectreadObject(ObjectInputStream in)
Reads the object from the object input stream.
voidwriteObject(Object o, ObjectOutputStream out)
Writes a serializable object description to the given object output stream.

Constructor Detail

Dimension2DSerializer

public Dimension2DSerializer()
Default Constructor.

Method Detail

getObjectClass

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

Returns: the class of java.awt.geom.Dimension2D.

readObject

public Object readObject(ObjectInputStream in)
Reads the object from the object input stream. This read the width and height and constructs a new FloatDimension object.

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.

writeObject

public void writeObject(Object o, ObjectOutputStream out)
Writes a serializable object description to the given object output stream. This method writes the width and the height of the dimension into the stream.

Parameters: o the to be serialized object. out the outputstream that should receive the object.

Throws: IOException if an I/O error occured.