Datasheet

Method Description
void removeNode() Removes this preference node and all of
its children. The only methods that can
be invoked after a node has been
removed are
name(), absolutePath(),
isUserNode(), flush(), and
nodeExists(“”), and those inherited
from
Object. All other methods will
throw an
IllegalStateException.
The removal may not be permanent until
flush() is called to persist the changes to
the tree.
static Preferences This method returns a preference node for
systemNodeForPackage(Class c) the package that the specified class is in.
All periods in the package name are
replaced with forward slashes.
For a class that has no package, the name
of the node that is returned is literally
<unnamed>. This node should not be used
long term, because it is shared by all pro-
grams that use it.
If the node does not already exist, the
node and all ancestors that do not exist
will automatically be created.
static Preferences systemRoot() This method returns the root node for the
system preferences tree.
static Preferences This method returns a preference node for
userNodeForPackage(Class c) the package that the specified class is in.
All periods in the package name are
replaced with forward slashes.
For a class that has no package, the name
of the node that is returned is literally
<unnamed>. This node should not be used
long term, because it is shared by all pro-
grams that use it, so configuration settings
are not isolated.
If the node does not already exist, the
node and all ancestors that do not exist
will automatically get created.
static Preferences userRoot() This method returns the root node for the
user preferences tree.
71
Chapter 1: Key Java Language Features and Libraries
05_777106 ch01.qxp 11/28/06 10:43 PM Page 71