|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ijchart.xychart.util.SerialUtil
public abstract class SerialUtil
Title: IJChart
Description: a chart library for the Java(tm) platform.
A class containing useful utility methods relating to serializationCopyright: Copyright (c) 2013
Company:
| Constructor Summary | |
|---|---|
SerialUtil()
|
|
| Method Summary | |
|---|---|
static boolean |
isSerializable(java.lang.Class c)
Returns true if a class implements Serializable and false otherwise |
static java.text.AttributedString |
readAttributedString(java.io.ObjectInputStream stream)
Reads a AttributedString object that has been serialised by the writeAttributedString(AttributedString,ObjectOutputStream) method |
static java.util.Hashtable |
readHashtablePaint(java.io.ObjectInputStream stream)
Reads a hashtable of (Object, Paint) elements from a stream |
static java.util.Hashtable |
readHashtableStroke(java.io.ObjectInputStream stream)
Reads a hashtable of (Object, Stroke) elements from a stream |
static java.awt.Image |
readImage(java.io.ObjectInputStream stream)
Reads a Image object that has been serialised by the writeImage(ObjectOutputStream,Image) method |
static java.awt.Paint |
readPaint(java.io.ObjectInputStream stream)
Reads a Paint object that has been serialised by the writePaint(ObjectOutputStream,Paint) method |
static java.util.Map |
readPaintMap(java.io.ObjectInputStream in)
Reads a Map of (Object, Paint) elements from a stream. |
static java.awt.geom.Point2D |
readPoint2D(java.io.ObjectInputStream stream)
Reads a Point2D object that has been serialised by the writePoint2D(ObjectOutputStream,Point2D) method |
static java.awt.Shape |
readShape(java.io.ObjectInputStream stream)
Reads a Shape object that has been serialised by the writeShape(ObjectOutputStream,Shape) method |
static java.awt.Stroke |
readStroke(java.io.ObjectInputStream stream)
Reads a Stroke object that has been serialised by the writeStroke(ObjectOutputStream,Stroke) method |
static void |
writeAttributedString(java.text.AttributedString as,
java.io.ObjectOutputStream stream)
Serialises an AttributedString object |
static void |
writeHashtablePaint(java.io.ObjectOutputStream stream,
java.util.Hashtable paints)
Write paint objects of a hashtable. |
static void |
writeHashtableStroke(java.io.ObjectOutputStream stream,
java.util.Hashtable strokes)
Write stroke objects of a hashtable. |
static void |
writeImage(java.io.ObjectOutputStream stream,
java.awt.Image image)
Serialises a Image object. |
static void |
writePaint(java.io.ObjectOutputStream stream,
java.awt.Paint paint)
Serialises a Paint object. |
static void |
writePaintMap(java.io.ObjectOutputStream out,
java.util.Map map)
Writes a map of (Comparable, Paint) elements to a stream. |
static void |
writePoint2D(java.io.ObjectOutputStream stream,
java.awt.geom.Point2D point)
Serialises a Point2D object |
static void |
writeShape(java.io.ObjectOutputStream stream,
java.awt.Shape shape)
Serialises a Shape object |
static void |
writeStroke(java.io.ObjectOutputStream stream,
java.awt.Stroke stroke)
Serialises a Stroke object.This code handles the BasicStroke class which is the only Stroke implementation provided by the JDK (and isn't directly Serializable). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SerialUtil()
| Method Detail |
|---|
public static boolean isSerializable(java.lang.Class c)
c - the class.
public static java.awt.Paint readPaint(java.io.ObjectInputStream stream)
throws java.io.IOException,
java.lang.ClassNotFoundException
writePaint(ObjectOutputStream,Paint) method
stream - ObjectOutputStream
the input stream (null not permitted).
java.io.IOException - if there is an I/O problem.
java.lang.ClassNotFoundException - if there is a problem loading a class.
public static void writePaint(java.io.ObjectOutputStream stream,
java.awt.Paint paint)
throws java.io.IOException
stream - ObjectOutputStream
the output stream (null not permitted).paint -
the paint object (null permitted).
java.io.IOException - if there is an I/O error.
public static java.awt.Stroke readStroke(java.io.ObjectInputStream stream)
throws java.io.IOException,
java.lang.ClassNotFoundException
writeStroke(ObjectOutputStream,Stroke) method
stream - ObjectOutputStream
the input stream (null not permitted).
java.io.IOException - if there is an I/O problem.
java.lang.ClassNotFoundException - if there is a problem loading a class.
public static void writeStroke(java.io.ObjectOutputStream stream,
java.awt.Stroke stroke)
throws java.io.IOException
stream - ObjectOutputStream
the output stream (null not permitted).stroke -
the stroke object (null permitted).
java.io.IOException - if there is an I/O error.
public static java.awt.Shape readShape(java.io.ObjectInputStream stream)
throws java.io.IOException,
java.lang.ClassNotFoundException
writeShape(ObjectOutputStream,Shape) method
stream - ObjectOutputStream
the input stream (null not permitted).
java.io.IOException - if there is an I/O problem.
java.lang.ClassNotFoundException -
if there is a problem loading a class
public static void writeShape(java.io.ObjectOutputStream stream,
java.awt.Shape shape)
throws java.io.IOException
stream - ObjectOutputStream
the output stream (null not permitted).shape -
the shape object (null permitted).
java.io.IOException - if there is an I/O error.
public static java.awt.geom.Point2D readPoint2D(java.io.ObjectInputStream stream)
throws java.io.IOException
writePoint2D(ObjectOutputStream,Point2D) method
stream - ObjectOutputStream
the input stream (null not permitted).
java.io.IOException - if there is an I/O problem.
public static void writePoint2D(java.io.ObjectOutputStream stream,
java.awt.geom.Point2D point)
throws java.io.IOException
stream - ObjectOutputStream
output stream (null not permitted).point -
the point object (null permitted).
java.io.IOException - if there is an I/O error.
public static java.text.AttributedString readAttributedString(java.io.ObjectInputStream stream)
throws java.io.IOException,
java.lang.ClassNotFoundException
writeAttributedString(AttributedString,ObjectOutputStream) method
stream - ObjectOutputStream
the input stream (null not permitted).
java.io.IOException -
if there is an I/O problem
java.lang.ClassNotFoundException - if there is a problem loading a class
public static void writeAttributedString(java.text.AttributedString as,
java.io.ObjectOutputStream stream)
throws java.io.IOException
as -
the attributed string object (null permitted).stream - ObjectOutputStream
the output stream (null not permitted).
java.io.IOException - if there is an I/O error.
public static java.util.Map readPaintMap(java.io.ObjectInputStream in)
throws java.io.IOException,
java.lang.ClassNotFoundException
in -
The input stream.
java.io.IOException
java.lang.ClassNotFoundException
public static void writePaintMap(java.io.ObjectOutputStream out,
java.util.Map map)
throws java.io.IOException
out -
The output stream.map -
The map (null permitted).
java.io.IOException
public static void writeHashtablePaint(java.io.ObjectOutputStream stream,
java.util.Hashtable paints)
throws java.io.IOException
stream - ObjectOutputStreampaints - Hashtable
The hashtable (null permitted).
java.io.IOException
public static java.util.Hashtable readHashtablePaint(java.io.ObjectInputStream stream)
throws java.io.IOException,
java.lang.ClassNotFoundException
stream - ObjectInputStream
java.io.IOException
java.lang.ClassNotFoundException
public static void writeHashtableStroke(java.io.ObjectOutputStream stream,
java.util.Hashtable strokes)
throws java.io.IOException
stream - ObjectOutputStreamstrokes - Hashtable
java.io.IOException
public static java.util.Hashtable readHashtableStroke(java.io.ObjectInputStream stream)
throws java.io.IOException,
java.lang.ClassNotFoundException
stream - ObjectInputStream
java.io.IOException
java.lang.ClassNotFoundException
public static void writeImage(java.io.ObjectOutputStream stream,
java.awt.Image image)
throws java.io.IOException
stream - ObjectOutputStream
the output stream (null not permitted).image - Image
the image object (null permitted).
java.io.IOException - if there is an I/O error.
public static java.awt.Image readImage(java.io.ObjectInputStream stream)
throws java.io.IOException,
java.lang.ClassNotFoundException
writeImage(ObjectOutputStream,Image) method
stream - ObjectOutputStream
the input stream (null not permitted).
java.io.IOException - if there is an I/O problem.
java.lang.ClassNotFoundException - if there is a problem loading a class.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||