Package info.monitorenter.util
Class SerializationUtility
- java.lang.Object
-
- info.monitorenter.util.SerializationUtility
-
public final class SerializationUtility extends java.lang.Object
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
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.awt.Stroke
readStroke(java.io.ObjectInputStream stream)
Reads aStroke
object that has been serialized by thewriteStroke(java.awt.Stroke, java.io.ObjectOutputStream)
method.static void
writeStroke(java.awt.Stroke stroke, java.io.ObjectOutputStream stream)
Serializes aStroke
object.
-
-
-
Method Detail
-
readStroke
public static java.awt.Stroke readStroke(java.io.ObjectInputStream stream) throws java.io.IOException, java.lang.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:
java.io.IOException
- if there is an I/O problem.java.lang.ClassNotFoundException
- if there is a problem loading a class.
-
writeStroke
public static void writeStroke(java.awt.Stroke stroke, java.io.ObjectOutputStream stream) throws java.io.IOException
Serializes aStroke
object.- Parameters:
stroke
- the stroke object.stream
- the output stream.- Throws:
java.io.IOException
- if there is an I/O error.
-
-