|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectkaapo.filemanager.ObjectSerializer
public class ObjectSerializer
A reusable class to simplify object serialization to disk. Has methods for writing any serializable objects to a file and reading them back.
| Constructor Summary | |
|---|---|
ObjectSerializer()
Constructs a new ObjectSerializer. |
|
| Method Summary | |
|---|---|
Object |
read(File file)
Reads an object from a file. |
void |
write(Object object,
File file)
Writes an object to a file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ObjectSerializer()
ObjectSerializer.
| Method Detail |
|---|
public Object read(File file)
throws IOException,
ClassNotFoundException
file - the file to be opened for reading
IOException - if an I/O error occurs
ClassNotFoundException
public void write(Object object,
File file)
throws IOException
object - the object to savefile - the file to be opened for writing
IOException - if an I/O error occurs
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||