|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.roo.classpath.preferences.Preferences
public class Preferences
A node in the user's tree of preferences.
| Constructor Summary | |
|---|---|
Preferences(Preferences preferences)
Constructor for delegating to a Java Preferences instance. |
|
| Method Summary | |
|---|---|
void |
flush()
Flushes any changes in these preferences to the persistent storage. |
byte[] |
getByteArray(String key)
Returns the byte array with the given key, or if none, an empty array. |
byte[] |
getByteArray(String key,
String defaultValue,
String characterSetName)
Returns the byte array with the given key, or if none, the given default value. |
int |
getInt(String key,
int defaultValue)
Returns the int with the given key, or if none, the given default value. |
void |
putByteArray(String key,
byte[] value)
Adds the given byte array under the given key. |
void |
putInt(String key,
int value)
Adds the given int value under the given key. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Preferences(Preferences preferences)
preferences - the preferences to read and write (required)| Method Detail |
|---|
public void flush()
IllegalStateException - if there was a problempublic byte[] getByteArray(String key)
key - the key whose value to retrieve (can be null)
null iff a null key is given
public byte[] getByteArray(String key,
String defaultValue,
String characterSetName)
key - the key whose value to retrieve (can be null)defaultValue - can be null to default to an empty arraycharacterSetName - the name of the character set into which to
encode the given default value
null iff a null key is given
UnsupportedOperationException - if the given character set is not
supported
public int getInt(String key,
int defaultValue)
key - the key whose value to retrieve (can be null)defaultValue - see above
public void putByteArray(String key,
byte[] value)
key - value -
public void putInt(String key,
int value)
key - value -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||