public abstract class Convertor extends Object
| Constructor and Description |
|---|
Convertor() |
| Modifier and Type | Method and Description |
|---|---|
protected static Lookup |
findContext(Reader r)
get a context associated with the reader
r. |
protected static Lookup |
findContext(Writer w)
get a context associated with the writer
w. |
abstract Object |
read(Reader r)
Subclasses have to be able to read format implemented by
write(java.io.Writer, java.lang.Object). |
abstract void |
registerSaver(Object inst,
Saver s)
register
saver; convertor can provide own policy notifing
the saver about changes of setting object. |
abstract void |
unregisterSaver(Object inst,
Saver s)
unregister
saver |
abstract void |
write(Writer w,
Object inst)
Subclasses can implement own storing format.
|
public abstract void write(Writer w, Object inst) throws IOException
w - stream into which inst is writteninst - the setting object to be writtenIOException - if the object cannot be writtenpublic abstract Object read(Reader r) throws IOException, ClassNotFoundException
write(java.io.Writer, java.lang.Object).r - stream containing stored objectIOException - if the object cannot be readClassNotFoundException - if the object class cannot be resolvedpublic abstract void registerSaver(Object inst, Saver s)
saver; convertor can provide own policy notifing
the saver about changes of setting object. (e.g. register property
change listener)inst - setting objects - saver implementationpublic abstract void unregisterSaver(Object inst, Saver s)
saverinst - setting objects - saver implementationregisterSaver(java.lang.Object, org.netbeans.spi.settings.Saver)protected static Lookup findContext(Reader r)
r. It can contain
various info like a file location of the read object etc.r - stream containing stored objectBuilt on August 24 2014. | Portions Copyright 1997-2014 Sun Microsystems, Inc. All rights reserved.