|
java.lang.Object
java.util.prefs.Preferences
- Direct Known Subclasses:
- AbstractPreferences
- See Also:
- Top Examples, Source Code,
system class loader, PreferencesFactory, BackingStoreException
public abstract String absolutePath() - Geek's Notes:
- Description Add your codes or notes Search More Java Examples
[236]Get user and system preferences By Anonymous on 2003/04/25 14:39:52 Rate
// Get Preferences objects for user and system preferences for the package that contains the TextEditor class. Preferences userprefs = Preferences.userNodeForPackage ( TextEditor.class ) ; Preferences sysprefs = Preferences.systemNodeForPackage ( TextEditor.class ) ; // Look up a user preference value as an integer. // Note that we always pass a default value int width = userprefs.getInt ( "width", 80 ) ; // Look up a user preference using a system preference as the default String dictionary = userprefs.get ( "dictionary", sysprefs.get ( "dictionary","default_dictionary" ) ) ; //absolutePath
public abstract void addNodeChangeListener(NodeChangeListener ncl) - See Also:
addPreferenceChangeListener(PreferenceChangeListener), removeNodeChangeListener(NodeChangeListener), removeNode(), IllegalStateException, NullPointerException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public abstract void addPreferenceChangeListener(PreferenceChangeListener pcl) - See Also:
addNodeChangeListener(NodeChangeListener), removePreferenceChangeListener(PreferenceChangeListener), removeNode(), IllegalStateException, NullPointerException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public abstract String[] childrenNames()
throws BackingStoreException- See Also:
removeNode(), IllegalStateException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public abstract void clear()
throws BackingStoreException- See Also:
removeNode(), IllegalStateException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public abstract void exportNode(OutputStream os)
throws IOException,
BackingStoreException- See Also:
importPreferences(InputStream), removeNode(), IllegalStateException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public abstract void exportSubtree(OutputStream os)
throws IOException,
BackingStoreException- See Also:
exportNode(OutputStream), importPreferences(InputStream), removeNode(), IllegalStateException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public abstract void flush()
throws BackingStoreException- See Also:
sync(), removeNode()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public abstract String get(String key,
String def)- See Also:
- NullPointerException,
removeNode(), IllegalStateException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public abstract boolean getBoolean(String key,
boolean def)- See Also:
putBoolean(String,boolean), get(String,String), NullPointerException, removeNode(), IllegalStateException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public abstract byte[] getByteArray(String key,
byte[] def)- See Also:
putByteArray(String,byte[]), get(String,String), NullPointerException, removeNode(), IllegalStateException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public abstract double getDouble(String key,
double def)- See Also:
get(String,String), putDouble(String,double), NullPointerException, removeNode(), IllegalStateException, NumberFormatException, Double.parseDouble(String)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public abstract float getFloat(String key,
float def)- See Also:
get(String,String), putFloat(String,float), NullPointerException, removeNode(), IllegalStateException, NumberFormatException, Float.parseFloat(String)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public abstract int getInt(String key,
int def)- See Also:
get(String,String), putInt(String,int), NullPointerException, removeNode(), IllegalStateException, NumberFormatException, Integer.parseInt(String)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public abstract long getLong(String key,
long def)- See Also:
get(String,String), putLong(String,long), NullPointerException, removeNode(), IllegalStateException, NumberFormatException, Long.parseLong(String)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public static void importPreferences(InputStream is)
throws IOException,
InvalidPreferencesFormatException- See Also:
RuntimePermission, SecurityException, put(String, String), node(String), exportSubtree(OutputStream), exportNode(OutputStream)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public abstract boolean isUserNode() - Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public abstract String[] keys()
throws BackingStoreException- See Also:
removeNode(), IllegalStateException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public static final int MAX_KEY_LENGTH - Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public static final int MAX_NAME_LENGTH - Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public static final int MAX_VALUE_LENGTH - Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public abstract String name() - Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public abstract Preferences node(String pathName) - See Also:
flush(), removeNode(), IllegalStateException, NullPointerException, IllegalArgumentException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public abstract boolean nodeExists(String pathName)
throws BackingStoreException- See Also:
removeNode(), NullPointerException, IllegalArgumentException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public abstract Preferences parent() - See Also:
removeNode(), IllegalStateException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
protected Preferences() - Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public abstract void put(String key,
String value)- See Also:
removeNode(), IllegalStateException, IllegalArgumentException, NullPointerException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public abstract void putBoolean(String key,
boolean value)- See Also:
get(String,String), getBoolean(String,boolean), removeNode(), IllegalStateException, IllegalArgumentException, NullPointerException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public abstract void putByteArray(String key,
byte[] value)- See Also:
get(String,String), getByteArray(String,byte[]), removeNode(), IllegalStateException, IllegalArgumentException, NullPointerException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public abstract void putDouble(String key,
double value)- See Also:
getDouble(String,double), removeNode(), IllegalStateException, IllegalArgumentException, NullPointerException, Double.toString(double)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public abstract void putFloat(String key,
float value)- See Also:
getFloat(String,float), removeNode(), IllegalStateException, IllegalArgumentException, NullPointerException, Float.toString(float)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public abstract void putInt(String key,
int value)- See Also:
getInt(String,int), removeNode(), IllegalStateException, IllegalArgumentException, NullPointerException, Integer.toString(int)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public abstract void putLong(String key,
long value)- See Also:
getLong(String,long), removeNode(), IllegalStateException, IllegalArgumentException, NullPointerException, Long.toString(long)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public abstract void remove(String key) - See Also:
removeNode(), IllegalStateException, NullPointerException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public abstract void removeNode()
throws BackingStoreException- See Also:
flush(), UnsupportedOperationException, IllegalStateException, Object, nodeExists(""), isUserNode(), absolutePath(), name()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public abstract void removeNodeChangeListener(NodeChangeListener ncl) - See Also:
addNodeChangeListener(NodeChangeListener), removeNode(), IllegalStateException, IllegalArgumentException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public abstract void removePreferenceChangeListener(PreferenceChangeListener pcl) - See Also:
addPreferenceChangeListener(PreferenceChangeListener), removeNode(), IllegalStateException, IllegalArgumentException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public abstract void sync()
throws BackingStoreException- See Also:
flush(), removeNode(), IllegalStateException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public static Preferences systemNodeForPackage(Class<?> c) - See Also:
RuntimePermission, SecurityException, NullPointerException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public static Preferences systemRoot() - See Also:
RuntimePermission, SecurityException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public abstract String toString() - See Also:
- Object
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public static Preferences userNodeForPackage(Class<?> c) - See Also:
RuntimePermission, SecurityException, NullPointerException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public static Preferences userRoot() - See Also:
RuntimePermission, SecurityException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
| Popular Tags |