public class PreferencesHandler
extends PropertiesConfiguration
PreferencesHandler parses a .prefs file for programmatic
management (i.e. reading/writing values).| Modifier | Constructor and Description |
|---|---|
protected |
PreferencesHandler(String file)
Construct a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
<T extends Enum<T>> |
getEnum(String key,
T defaultValue)
Get the enum value associated with the given key.
|
long |
getSize(String key,
long defaultValue)
Get the size description associated with the given key.
|
clone, createLayout, getEncoding, getHeader, getInclude, getIncludesAllowed, getIOFactory, getLayout, load, save, setBasePath, setHeader, setInclude, setIncludesAllowed, setIOFactory, setLayout, unescapeJavaaddProperty, clearProperty, closeSilent, configurationChanged, containsKey, enterNoReload, exitNoReload, fireEvent, getBasePath, getFile, getFileName, getFileSystem, getKeys, getPath, getProperty, getReloadingStrategy, getReloadLock, getURL, isAutoSave, isEmpty, load, load, load, load, load, load, possiblySave, refresh, reload, reload, resetFileSystem, save, save, save, save, save, save, setAutoSave, setEncoding, setFile, setFileName, setFileSystem, setPath, setProperty, setReloadingStrategy, setURLaddErrorLogListener, append, copy, createInterpolator, getBigDecimal, getBigDecimal, getBigInteger, getBigInteger, getBoolean, getBoolean, getBoolean, getByte, getByte, getByte, getDefaultListDelimiter, getDelimiter, getDouble, getDouble, getDouble, getFloat, getFloat, getFloat, getInt, getInt, getInteger, getInterpolator, getKeys, getList, getList, getListDelimiter, getLogger, getLong, getLong, getLong, getProperties, getProperties, getShort, getShort, getShort, getString, getString, getStringArray, getSubstitutor, interpolate, interpolate, interpolatedConfiguration, interpolateHelper, isDelimiterParsingDisabled, isScalarValue, isThrowExceptionOnMissing, resolveContainerStore, setDefaultListDelimiter, setDelimiter, setDelimiterParsingDisabled, setListDelimiter, setLogger, setThrowExceptionOnMissing, subsetaddConfigurationListener, addErrorListener, clearConfigurationListeners, clearErrorListeners, createErrorEvent, createEvent, fireError, getConfigurationListeners, getErrorListeners, isDetailEvents, removeConfigurationListener, removeErrorListener, setDetailEventsequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclear, getBigDecimal, getBigDecimal, getBigInteger, getBigInteger, getBoolean, getBoolean, getBoolean, getByte, getByte, getByte, getDouble, getDouble, getDouble, getFloat, getFloat, getFloat, getInt, getInt, getInteger, getKeys, getList, getList, getLong, getLong, getLong, getProperties, getShort, getShort, getShort, getString, getString, getStringArray, subsetprotected PreferencesHandler(String file) throws ConfigurationException
The implementing class is encouraged to provide a static "open" method
that catches ConfigurationException and propagates it as a
RuntimeException so that users don't have to worry about it.
file - the absolute path to the preferences file (relative paths
will resolve to the user's home directory)ConfigurationExceptionpublic long getSize(String key, long defaultValue)
key - defaultValue - public <T extends Enum<T>> T getEnum(String key, T defaultValue)
key - defaultValue -