Package info.monitorenter.util
Class SerializationUtility
java.lang.Object
info.monitorenter.util.SerializationUtility
A class containing useful utility methods relating to serialization.
This is originally inspired (serialization of trokes) by jfreechart.
- Version:
- $Revision: 1.6 $
- Author:
- David Gilbert (original), Achim Westermann
-
Method Summary
Modifier and TypeMethodDescriptionstatic StrokereadStroke(ObjectInputStream stream) Reads aStrokeobject that has been serialized by thewriteStroke(java.awt.Stroke, java.io.ObjectOutputStream)method.static voidwriteStroke(Stroke stroke, ObjectOutputStream stream) Serializes aStrokeobject.
-
Method Details
-
readStroke
public static Stroke readStroke(ObjectInputStream stream) throws IOException, ClassNotFoundException Reads aStrokeobject that has been serialized by thewriteStroke(java.awt.Stroke, java.io.ObjectOutputStream)method.- Parameters:
stream- the input stream.- Returns:
- The stroke object.
- Throws:
IOException- if there is an I/O problem.ClassNotFoundException- if there is a problem loading a class.
-
writeStroke
Serializes aStrokeobject.- Parameters:
stroke- the stroke object.stream- the output stream.- Throws:
IOException- if there is an I/O error.
-