SerializedType - The type of object that can be serialized.public interface FileSerializationHandler<SerializedType>
AbstractFileSerializationHandler,
StreamSerializationHandler,
TextSerializationHandler| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
readFromFile(java.io.File file)
Reads an object from the given file.
|
java.lang.Object |
readFromFile(java.lang.String fileName)
Reads an object from the given file.
|
void |
writeToFile(java.io.File file,
SerializedType object)
Reads an object from a given file.
|
void |
writeToFile(java.lang.String fileName,
SerializedType object)
Writes an object to a given file.
|
void writeToFile(java.lang.String fileName,
SerializedType object)
throws java.io.IOException
fileName - The name of the file to write the object to.object - The object to write.java.io.IOException - If there is an i/o error.void writeToFile(java.io.File file,
SerializedType object)
throws java.io.IOException
file - The file to write the object to.object - The object to write.java.io.IOException - If there is an i/o error.java.lang.Object readFromFile(java.lang.String fileName)
throws java.io.IOException,
java.lang.ClassNotFoundException
fileName - The name of the file to read an object from.java.io.IOException - If there is an i/o error.java.lang.ClassNotFoundException - If a class cannot be found.java.lang.Object readFromFile(java.io.File file)
throws java.io.IOException,
java.lang.ClassNotFoundException
file - The file to read an object from.java.io.IOException - If there is an i/o error.java.lang.ClassNotFoundException - If a class cannot be found.