API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.util.prefs. AbstractPreferences View Source
Author(s)
Josh Bloch
Since
1.4
Version
1.25, 06/06/06
Serial
Hierarchy
 Object
      Preferences
          AbstractPreferences
Implements
Subclasses
Description
publicabstract abstract class AbstractPreferences
  This class provides a skeletal implementation of the Preferences class, greatly easing the task of implementing it.
See also:    Preferences
Constructors
protected AbstractPreferences (AbstractPreferences parent, String name)
  Creates a preference node with the specified parent and the specified name relative to its parent.
Methods
Hide/Show inherited methods
public String absolutePath () [Specified in Preferences]
  Implements the absolutePath method as per the specification in Preferences.absolutePath().
public void addNodeChangeListener (NodeChangeListener ncl) [Specified in Preferences]
public void addPreferenceChangeListener (PreferenceChangeListener pcl) [Specified in Preferences]
protectedfinal AbstractPreferences cachedChildren ()
  Returns all known unremoved children of this node.
public String childrenNames () throws BackingStoreException [Specified in Preferences]
  Implements the children method as per the specification in Preferences.childrenNames().
protectedabstract String childrenNamesSpi () throws BackingStoreException
  Returns the names of the children of this preference node.
protectedabstract AbstractPreferences childSpi (String name)
  Returns the named child of this preference node, creating it if it does not already exist.
public void clear () throws BackingStoreException [Specified in Preferences]
  Implements the clear method as per the specification in Preferences.clear().
public void exportNode (OutputStream os) throws IOException BackingStoreException [Specified in Preferences]
  Implements the exportNode method as per the specification in Preferences.exportNode(OutputStream).
public void exportSubtree (OutputStream os) throws IOException BackingStoreException [Specified in Preferences]
  Implements the exportSubtree method as per the specification in Preferences.exportSubtree(OutputStream).
public void flush () throws BackingStoreException [Specified in Preferences]
  Implements the flush method as per the specification in Preferences.flush().
protectedabstract void flushSpi () throws BackingStoreException
  This method is invoked with this node locked.
public String get (String key, String def) [Specified in Preferences]
  Implements the get method as per the specification in Preferences.get(String,String).
public boolean getBoolean (String key, boolean def) [Specified in Preferences]
  Implements the getBoolean method as per the specification in Preferences.getBoolean(String,boolean).
public byte getByteArray (String key, byte[] def) [Specified in Preferences]
  Implements the getByteArray method as per the specification in Preferences.getByteArray(String,byte[]).
protected AbstractPreferences getChild (String nodeName) throws BackingStoreException
  Returns the named child if it exists, or null if it does not.
public double getDouble (String key, double def) [Specified in Preferences]
  Implements the getDouble method as per the specification in Preferences.getDouble(String,double).
public float getFloat (String key, float def) [Specified in Preferences]
  Implements the getFloat method as per the specification in Preferences.getFloat(String,float).
public int getInt (String key, int def) [Specified in Preferences]
  Implements the getInt method as per the specification in Preferences.getInt(String,int).
public long getLong (String key, long def) [Specified in Preferences]
  Implements the getLong method as per the specification in Preferences.getLong(String,long).
protectedabstract String getSpi (String key)
  Return the value associated with the specified key at this preference node, or null if there is no association for this key, or the association cannot be determined at this time.
publicstatic void importPreferences (InputStream is) throws IOException InvalidPreferencesFormatException [Inherited From Preferences]
  Imports all of the preferences represented by the XML document on the specified input stream.
protected boolean isRemoved ()
  Returns true iff this node (or an ancestor) has been removed with the AbstractPreferences.removeNode() method.
public boolean isUserNode () [Specified in Preferences]
  Implements the isUserNode method as per the specification in Preferences.isUserNode().
public String keys () throws BackingStoreException [Specified in Preferences]
  Implements the keys method as per the specification in Preferences.keys().
protectedabstract String keysSpi () throws BackingStoreException
  Returns all of the keys that have an associated value in this preference node.
public String name () [Specified in Preferences]
  Implements the name method as per the specification in Preferences.name().
public Preferences node (String path) [Specified in Preferences]
  Implements the node method as per the specification in Preferences.node(String).
public boolean nodeExists (String path) throws BackingStoreException [Specified in Preferences]
  Implements the nodeExists method as per the specification in Preferences.nodeExists(String).
pack-private NodeChangeListener nodeListeners ()
public Preferences parent () [Specified in Preferences]
  Implements the parent method as per the specification in Preferences.parent().
pack-private PreferenceChangeListener prefListeners ()
  Return this node's preference/node change listeners.
public void put (String key, String value) [Specified in Preferences]
  Implements the put method as per the specification in Preferences.put(String,String).
public void putBoolean (String key, boolean value) [Specified in Preferences]
  Implements the putBoolean method as per the specification in Preferences.putBoolean(String,boolean).
public void putByteArray (String key, byte[] value) [Specified in Preferences]
  Implements the putByteArray method as per the specification in Preferences.putByteArray(String,byte[]).
public void putDouble (String key, double value) [Specified in Preferences]
  Implements the putDouble method as per the specification in Preferences.putDouble(String,double).
public void putFloat (String key, float value) [Specified in Preferences]
  Implements the putFloat method as per the specification in Preferences.putFloat(String,float).
public void putInt (String key, int value) [Specified in Preferences]
  Implements the putInt method as per the specification in Preferences.putInt(String,int).
public void putLong (String key, long value) [Specified in Preferences]
  Implements the putLong method as per the specification in Preferences.putLong(String,long).
protectedabstract void putSpi (String key, String value)
  Put the given key-value association into this preference node.
public void remove (String key) [Specified in Preferences]
  Implements the remove(String) method as per the specification in Preferences.remove(String).
public void removeNode () throws BackingStoreException [Specified in Preferences]
  Implements the removeNode() method as per the specification in Preferences.removeNode().
public void removeNodeChangeListener (NodeChangeListener ncl) [Specified in Preferences]
protectedabstract void removeNodeSpi () throws BackingStoreException
  Removes this preference node, invalidating it and any preferences that it contains.
public void removePreferenceChangeListener (PreferenceChangeListener pcl) [Specified in Preferences]
protectedabstract void removeSpi (String key)
  Remove the association (if any) for the specified key at this preference node.
public void sync () throws BackingStoreException [Specified in Preferences]
  Implements the sync method as per the specification in Preferences.sync().
protectedabstract void syncSpi () throws BackingStoreException
  This method is invoked with this node locked.
publicstatic Preferences systemNodeForPackage (Class<Object> c) [Inherited From Preferences]
  Returns the preference node from the system preference tree that is associated (by convention) with the specified class's package.
publicstatic Preferences systemRoot () [Inherited From Preferences]
  Returns the root preference node for the system.
public String toString () [Specified in Preferences]
Returns the absolute path name of this preferences node.
publicstatic Preferences userNodeForPackage (Class<Object> c) [Inherited From Preferences]
  Returns the preference node from the calling user's preference tree that is associated (by convention) with the specified class's package.
publicstatic Preferences userRoot () [Inherited From Preferences]
  Returns the root preference node for the calling user.
Fields
Hide/Show inherited fields
protectedfinal Object lock
  An object whose monitor is used to lock this node.
publicfinalstatic int MAX_KEY_LENGTH = "80" [Inherited From Preferences]
Maximum length of string allowed as a key (80 characters).
publicfinalstatic int MAX_NAME_LENGTH = "80" [Inherited From Preferences]
Maximum length of a node name (80 characters).
publicfinalstatic int MAX_VALUE_LENGTH = "8192" [Inherited From Preferences]
Maximum length of string allowed as a value (8192 characters).
protected boolean newNode
  This field should be true if this node did not exist in the backing store prior to the creation of this object.
pack-privatefinal AbstractPreferences parent
Our parent node.
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar