Interface sfclasses.Persistent
All Packages Class Hierarchy This Package Previous Next Index
Interface sfclasses.Persistent
- public interface Persistent
- extends Object
A class must implement the Persistent interface for its objects
to be storable. When saving an object, the object's write method
is called and when loading an object, the object's read method
is called.
- See Also:
- PersistentInputStream, PersistentOutputStream
-
read(PersistentInputStream)
- The implementation of the read() method must restore the data
in the order written by the write() method before.
-
write(PersistentOutputStream)
- The implementation of the write() method must write all data
that is part of the object's persistent state to the stream
given as parameter.
write
public abstract void write(PersistentOutputStream os)
- The implementation of the write() method must write all data
that is part of the object's persistent state to the stream
given as parameter. The methods provided by PersistentOutputStream
must be used to write the data.
- See Also:
- PersistentOutputStream
read
public abstract void read(PersistentInputStream is) throws IOException
- The implementation of the read() method must restore the data
in the order written by the write() method before. The methods
provided by PersistentInputStream must be used to read the data.
- See Also:
- PersistentInputStream
All Packages Class Hierarchy This Package Previous Next Index