|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Exportable
Flags a class as being exportable, meaning that it can be written to Exporters and read
from their corresponding Importers. Exportable classes must have a no-argument
constructor that initializes fields to their default values (fields containing default values
are omitted from the export).
All non-transient fields will be automatically written and restored for an
Exportable instance. Classes that wish to customize the export process should implement
methods with the following signatures:
public void writeFields (
Exporter out)
throws IOException;
public void readFields (Importer in)
throws IOException;
They can then handle the entirety of the export process, or call
Exporter.defaultWriteFields() and Importer.defaultReadFields() from within their
writeFields and readFields methods to perform the standard export
in addition to their customized behavior.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||