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