Class Dimension2DSerializer
java.lang.Object
org.pentaho.reporting.libraries.serializer.methods.Dimension2DSerializer
- All Implemented Interfaces:
SerializeMethod
A SerializeMethod implementation that handles Dimension2D objects.
- Author:
- Thomas Morgner
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the class of the object, which this object can serialize.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.
-
Constructor Details
-
Dimension2DSerializer
public Dimension2DSerializer()Default Constructor.
-
-
Method Details
-
writeObject
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.- Specified by:
writeObject
in interfaceSerializeMethod
- Parameters:
o
- the to be serialized object.out
- the outputstream that should receive the object.- Throws:
IOException
- if an I/O error occured.
-
readObject
Reads the object from the object input stream. This read the width and height and constructs a new FloatDimension object.- Specified by:
readObject
in interfaceSerializeMethod
- 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
Returns the class of the object, which this object can serialize.- Specified by:
getObjectClass
in interfaceSerializeMethod
- Returns:
- the class of java.awt.geom.Dimension2D.
-