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 Stroke
readStroke
(ObjectInputStream stream) Reads aStroke
object that has been serialized by thewriteStroke(java.awt.Stroke, java.io.ObjectOutputStream)
method.static void
writeStroke
(Stroke stroke, ObjectOutputStream stream) Serializes aStroke
object.
-
Method Details
-
readStroke
public static Stroke readStroke(ObjectInputStream stream) throws IOException, ClassNotFoundException Reads aStroke
object 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 aStroke
object.- Parameters:
stroke
- the stroke object.stream
- the output stream.- Throws:
IOException
- if there is an I/O error.
-