public class SerializationUtils
extends java.lang.Object
Constructor and Description |
---|
SerializationUtils() |
Modifier and Type | Method and Description |
---|---|
static java.lang.Object |
readObject(java.io.File serializedFile)
Reads an object from a serialized file.
|
static void |
writeObject(java.lang.Object object,
java.io.File destinationFile)
Writes an object to the destination file.
|
public static void writeObject(java.lang.Object object, java.io.File destinationFile) throws java.io.IOException
object
- the objectdestinationFile
- the destination filejava.io.IOException
- exception thrown whenever an error occurred while
writing the filepublic static java.lang.Object readObject(java.io.File serializedFile) throws java.io.IOException, java.lang.ClassNotFoundException
serializedFile
- the serialized filejava.io.IOException
- exception thrown whenever an error occurred while
reading the filejava.lang.ClassNotFoundException
- exception thrown whenever an unknown class
is foundCopyright © 2013. All Rights Reserved.