public final class SerializationUtility extends Object
This is originally inspired (serialization of trokes) by jfreechart.
Modifier and Type | Method and Description |
---|---|
static Stroke |
readStroke(ObjectInputStream stream)
Reads a
Stroke object that has been serialized by the
writeStroke(java.awt.Stroke, java.io.ObjectOutputStream) method. |
static void |
writeStroke(Stroke stroke,
ObjectOutputStream stream)
Serializes a
Stroke object. |
public static Stroke readStroke(ObjectInputStream stream) throws IOException, ClassNotFoundException
Stroke
object that has been serialized by the
writeStroke(java.awt.Stroke, java.io.ObjectOutputStream)
method.stream
- the input stream.IOException
- if there is an I/O problem.ClassNotFoundException
- if there is a problem loading a class.public static void writeStroke(Stroke stroke, ObjectOutputStream stream) throws IOException
Stroke
object.stroke
- the stroke object.stream
- the output stream.IOException
- if there is an I/O error.Copyright © 2017. All rights reserved.