com.compomics.util.io
Class SerializationUtils
java.lang.Object
com.compomics.util.io.SerializationUtils
public class SerializationUtils
- extends Object
This class implements convenience methods for serialization and
deserialization.
- Author:
- Marc Vaudel
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SerializationUtils
public SerializationUtils()
writeObject
public static void writeObject(Object object,
File destinationFile)
throws IOException
- Writes an object to the destination file.
- Parameters:
object
- the objectdestinationFile
- the destination file
- Throws:
IOException
- exception thrown whenever an error occurred while
writing the file
readObject
public static Object readObject(File serializedFile)
throws IOException,
ClassNotFoundException
- Reads an object from a serialized file.
- Parameters:
serializedFile
- the serialized file
- Returns:
- the object
- Throws:
IOException
- exception thrown whenever an error occurred while
reading the file
ClassNotFoundException
- exception thrown whenever an unknown class
is found
Copyright © 2012. All Rights Reserved.