public class IniPreferences extends AbstractPreferences
Modifier and Type | Class and Description |
---|---|
protected class |
IniPreferences.SectionPreferences |
lock, newNode
MAX_KEY_LENGTH, MAX_NAME_LENGTH, MAX_VALUE_LENGTH
Constructor and Description |
---|
IniPreferences(Ini ini)
Constructs a new preferences node on top of
Ini instance. |
IniPreferences(InputStream input)
Constructs a new preferences node based on newly loaded
Ini instance. |
IniPreferences(Reader input)
Constructs a new preferences node based on newly loaded
Ini instance. |
IniPreferences(URL input)
Constructs a new preferences node based on newly loaded
Ini instance. |
Modifier and Type | Method and Description |
---|---|
protected String[] |
childrenNamesSpi()
Implements the
childrenNamesSpi method as per the specification in
AbstractPreferences.childrenNamesSpi() . |
protected IniPreferences.SectionPreferences |
childSpi(String name)
Implements the
childSpi method as per the specification in
AbstractPreferences.childSpi(String) . |
protected void |
flushSpi()
Implements the
flushSpi method as per the specification in
AbstractPreferences.flushSpi() . |
protected Ini |
getIni()
Provide access to underlaying
Ini implementation. |
protected String |
getSpi(String key)
Implements the
getSpi method as per the specification in
AbstractPreferences.getSpi(String) . |
protected String[] |
keysSpi()
Implements the
keysSpi method as per the specification in
AbstractPreferences.keysSpi() . |
protected void |
putSpi(String key,
String value)
Implements the
putSpi method as per the specification in
AbstractPreferences.putSpi(String,String) . |
protected void |
removeNodeSpi()
Implements the
removeNodeSpi method as per the specification in
AbstractPreferences.removeNodeSpi() . |
protected void |
removeSpi(String key)
Implements the
removeSpi method as per the specification in
AbstractPreferences.removeSpi(String) . |
protected void |
syncSpi()
Implements the
syncSpi method as per the specification in
AbstractPreferences.syncSpi() . |
absolutePath, addNodeChangeListener, addPreferenceChangeListener, cachedChildren, childrenNames, clear, exportNode, exportSubtree, flush, get, getBoolean, getByteArray, getChild, getDouble, getFloat, getInt, getLong, isRemoved, isUserNode, keys, name, node, nodeExists, parent, put, putBoolean, putByteArray, putDouble, putFloat, putInt, putLong, remove, removeNode, removeNodeChangeListener, removePreferenceChangeListener, sync, toString
importPreferences, systemNodeForPackage, systemRoot, userNodeForPackage, userRoot
public IniPreferences(Ini ini)
Ini
instance.ini
- underlaying Ini
instancepublic IniPreferences(Reader input) throws IOException, InvalidFileFormatException
Ini
instance.
This is just a helper constructor, to make simpler constructing IniPreferences
directly from Reader
.input
- the Reader
containing Ini
dataIOException
- if an I/O error occuredInvalidFileFormatException
- if Ini
parsing error occuredpublic IniPreferences(InputStream input) throws IOException, InvalidFileFormatException
Ini
instance.
This is just a helper constructor, to make simpler constructing IniPreferences
directly from InputStream
.input
- the InputStream
containing Ini
dataIOException
- if an I/O error occuredInvalidFileFormatException
- if Ini
parsing error occuredpublic IniPreferences(URL input) throws IOException, InvalidFileFormatException
Ini
instance.
This is just a helper constructor, to make simpler constructing IniPreferences
directly from URL
.input
- the URL
containing Ini
dataIOException
- if an I/O error occuredInvalidFileFormatException
- if Ini
parsing error occuredprotected Ini getIni()
Ini
implementation.Ini
implementationprotected String getSpi(String key) throws UnsupportedOperationException
getSpi
method as per the specification in
AbstractPreferences.getSpi(String)
.
This implementation doesn't support this operation, so allways throws UnsupportedOperationException.getSpi
in class AbstractPreferences
key
- key to getvalue forUnsupportedOperationException
- this implementation allways throws this exceptionprotected String[] childrenNamesSpi() throws BackingStoreException
childrenNamesSpi
method as per the specification in
AbstractPreferences.childrenNamesSpi()
.childrenNamesSpi
in class AbstractPreferences
BackingStoreException
- if this operation cannot be completed due to a failure in the backing store, or inability to communicate with it.protected IniPreferences.SectionPreferences childSpi(String name)
childSpi
method as per the specification in
AbstractPreferences.childSpi(String)
.childSpi
in class AbstractPreferences
name
- child nameprotected void flushSpi() throws BackingStoreException
flushSpi
method as per the specification in
AbstractPreferences.flushSpi()
.
This implementation does nothing.flushSpi
in class AbstractPreferences
BackingStoreException
- if this operation cannot be completed due to a failure in the backing store, or inability to communicate with it.protected String[] keysSpi() throws BackingStoreException
keysSpi
method as per the specification in
AbstractPreferences.keysSpi()
.
This implementation allways return an empty array.keysSpi
in class AbstractPreferences
BackingStoreException
- if this operation cannot be completed due to a failure in the backing store, or inability to communicate with it.protected void putSpi(String key, String value) throws UnsupportedOperationException
putSpi
method as per the specification in
AbstractPreferences.putSpi(String,String)
.
This implementation doesn;t support this operation, so allways throws UnsupportedOperationException.putSpi
in class AbstractPreferences
key
- key to set value forvalue
- new value for keyUnsupportedOperationException
- this implementation allways throws this exceptionprotected void removeNodeSpi() throws BackingStoreException, UnsupportedOperationException
removeNodeSpi
method as per the specification in
AbstractPreferences.removeNodeSpi()
.
This implementation doesn;t support this operation, so allways throws UnsupportedOperationException.removeNodeSpi
in class AbstractPreferences
UnsupportedOperationException
- this implementation allways throws this exceptionBackingStoreException
- this implementation never throws this exceptionprotected void removeSpi(String key) throws UnsupportedOperationException
removeSpi
method as per the specification in
AbstractPreferences.removeSpi(String)
.removeSpi
in class AbstractPreferences
key
- key to removeUnsupportedOperationException
- this implementation allways throws this exceptionprotected void syncSpi() throws BackingStoreException
syncSpi
method as per the specification in
AbstractPreferences.syncSpi()
.
This implementation does nothing.syncSpi
in class AbstractPreferences
BackingStoreException
- if this operation cannot be completed due to a failure in the backing store, or inability to communicate with it.Copyright © 2016. All rights reserved.