|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.jameleon.util.InstanceSerializer
public class InstanceSerializer
Field Summary | |
---|---|
static String |
SERIALIZED_EXT
The file extension for serialized files |
Method Summary | |
---|---|
static Object |
deserialize(InputStream in)
Deserializes an object from a given InputStream |
static Object |
deserialize(String fileName)
Deserializes an object from a given file name |
static void |
serialize(Object obj,
File file)
Serializes a given object to a given file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String SERIALIZED_EXT
Method Detail |
---|
public static void serialize(Object obj, File file) throws IOException
obj
- - the object to serializefile
- - the file to serialize the object to
IOException
- if the file can't be serializedpublic static Object deserialize(String fileName) throws IOException, ClassNotFoundException
fileName
- - A String representing the location of the serialized file
IOException
- - If the file can not be deserialzed
ClassNotFoundException
- - If a class corresponding to the serialized file
is not in the Classpathpublic static Object deserialize(InputStream in) throws IOException, ClassNotFoundException
in
- - An InputStream representing a serialized file.
IOException
- - If the file can not be deserialzed
ClassNotFoundException
- - If a class corresponding to the serialized file
is not in the Classpath
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |