Interface SerializeMethod
- All Known Implementing Classes:
Arc2DSerializer
,AttributedStringSerializer
,BasicStrokeSerializer
,Dimension2DSerializer
,Ellipse2DSerializer
,GeneralPathSerializer
,GradientPaintSerializer
,Line2DSerializer
,PageFormatSerializer
,Point2DSerializer
,Rectangle2DSerializer
,RoundRectangle2DSerializer
public interface SerializeMethod
The SerializeMethod is used to define a serialization strategy for a certain object type.
- Author:
- Thomas Morgner
-
Method Summary
Modifier and TypeMethodDescriptionThe 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.
-
Method Details
-
writeObject
Writes a serializable object description to the given object output stream.- 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.- 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
Class getObjectClass()The class of the object, which this object can serialize.- Returns:
- the class of the object type, which this method handles.
-