|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdsto.dfc.swing.persistence.Deserializer
public final class Deserializer
Support for deserializing objects in various formats.
Serializer
Method Summary | |
---|---|
static InputStream |
openAutoDetect(InputStream stream,
SerializedFormat format)
Open a data stream, auto detecting format and adding a decompressor if stream is compressed. |
static Object |
read(File file)
|
static Object |
read(File file,
SerializedFormat format)
|
static Object |
read(InputStream stream)
|
static Object |
read(InputStream stream,
SerializedFormat format)
Read an object from an input stream. |
static Object |
read(String fileName)
|
static Object |
read(String fileName,
SerializedFormat format)
Read a serialized object from a file, autodetecting serialized format. |
static Object |
readObject(InputStream input,
SerializedFormat format)
Read an object from an input stream using the correct reader for the given format. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Object read(File file) throws FileNotFoundException, ClassNotFoundException, IOException
FileNotFoundException
ClassNotFoundException
IOException
public static Object read(File file, SerializedFormat format) throws FileNotFoundException, ClassNotFoundException, IOException
FileNotFoundException
ClassNotFoundException
IOException
public static Object read(String fileName) throws FileNotFoundException, ClassNotFoundException, IOException
FileNotFoundException
ClassNotFoundException
IOException
public static Object read(String fileName, SerializedFormat format) throws FileNotFoundException, ClassNotFoundException, IOException
fileName
- The file to read from.format
- The detected format is stored here if non-null.
FileNotFoundException
ClassNotFoundException
IOException
public static Object read(InputStream stream) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
public static Object read(InputStream stream, SerializedFormat format) throws IOException, ClassNotFoundException
stream
- The stream to read from.format
- The detected format of the stream will be recorded
in this if it is not null.
IOException
- if an error occurs
ClassNotFoundException
- if an error occurspublic static Object readObject(InputStream input, SerializedFormat format) throws IOException, ClassNotFoundException
read(InputStream,SerializedFormat)
.
input
- The stream to read from. Note that if using binary mode,
and input is already an ObjectInput instance, it is used directly.format
- The format of the stream.
IOException
- if an error occurs
ClassNotFoundException
- if an error occurspublic static InputStream openAutoDetect(InputStream stream, SerializedFormat format) throws IOException
format
- Auto detected format is stored here.
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |