Package org.ini4j
Class IniPreferences
- java.lang.Object
-
- java.util.prefs.Preferences
-
- java.util.prefs.AbstractPreferences
-
- org.ini4j.IniPreferences
-
public class IniPreferences extends java.util.prefs.AbstractPreferences
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classIniPreferences.SectionPreferences
-
Constructor Summary
Constructors Constructor Description IniPreferences(java.io.InputStream input)Constructs a new preferences node based on newly loadedIniinstance.IniPreferences(java.io.Reader input)Constructs a new preferences node based on newly loadedIniinstance.IniPreferences(java.net.URL input)Constructs a new preferences node based on newly loadedIniinstance.IniPreferences(Ini ini)Constructs a new preferences node on top ofIniinstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String[]childrenNamesSpi()Implements thechildrenNamesSpimethod as per the specification inAbstractPreferences.childrenNamesSpi().protected IniPreferences.SectionPreferenceschildSpi(java.lang.String name)Implements thechildSpimethod as per the specification inAbstractPreferences.childSpi(String).protected voidflushSpi()Implements theflushSpimethod as per the specification inAbstractPreferences.flushSpi().protected InigetIni()Provide access to underlayingIniimplementation.protected java.lang.StringgetSpi(java.lang.String key)Implements thegetSpimethod as per the specification inAbstractPreferences.getSpi(String).protected java.lang.String[]keysSpi()Implements thekeysSpimethod as per the specification inAbstractPreferences.keysSpi().protected voidputSpi(java.lang.String key, java.lang.String value)Implements theputSpimethod as per the specification inAbstractPreferences.putSpi(String,String).protected voidremoveNodeSpi()Implements theremoveNodeSpimethod as per the specification inAbstractPreferences.removeNodeSpi().protected voidremoveSpi(java.lang.String key)Implements theremoveSpimethod as per the specification inAbstractPreferences.removeSpi(String).protected voidsyncSpi()Implements thesyncSpimethod as per the specification inAbstractPreferences.syncSpi().-
Methods inherited from class java.util.prefs.AbstractPreferences
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
-
-
-
-
Constructor Detail
-
IniPreferences
public IniPreferences(Ini ini)
Constructs a new preferences node on top ofIniinstance.- Parameters:
ini- underlayingIniinstance
-
IniPreferences
public IniPreferences(java.io.Reader input) throws java.io.IOException, InvalidFileFormatExceptionConstructs a new preferences node based on newly loadedIniinstance. This is just a helper constructor, to make simpler constructingIniPreferencesdirectly fromReader.- Parameters:
input- theReadercontainingInidata- Throws:
java.io.IOException- if an I/O error occuredInvalidFileFormatException- ifIniparsing error occured
-
IniPreferences
public IniPreferences(java.io.InputStream input) throws java.io.IOException, InvalidFileFormatExceptionConstructs a new preferences node based on newly loadedIniinstance. This is just a helper constructor, to make simpler constructingIniPreferencesdirectly fromInputStream.- Parameters:
input- theInputStreamcontainingInidata- Throws:
java.io.IOException- if an I/O error occuredInvalidFileFormatException- ifIniparsing error occured
-
IniPreferences
public IniPreferences(java.net.URL input) throws java.io.IOException, InvalidFileFormatExceptionConstructs a new preferences node based on newly loadedIniinstance. This is just a helper constructor, to make simpler constructingIniPreferencesdirectly fromURL.- Parameters:
input- theURLcontainingInidata- Throws:
java.io.IOException- if an I/O error occuredInvalidFileFormatException- ifIniparsing error occured
-
-
Method Detail
-
getIni
protected Ini getIni()
Provide access to underlayingIniimplementation.- Returns:
Iniimplementation
-
getSpi
protected java.lang.String getSpi(java.lang.String key) throws java.lang.UnsupportedOperationExceptionImplements thegetSpimethod as per the specification inAbstractPreferences.getSpi(String). This implementation doesn't support this operation, so allways throws UnsupportedOperationException.- Specified by:
getSpiin classjava.util.prefs.AbstractPreferences- Parameters:
key- key to getvalue for- Returns:
- if 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.
- Throws:
java.lang.UnsupportedOperationException- this implementation allways throws this exception
-
childrenNamesSpi
protected java.lang.String[] childrenNamesSpi() throws java.util.prefs.BackingStoreExceptionImplements thechildrenNamesSpimethod as per the specification inAbstractPreferences.childrenNamesSpi().- Specified by:
childrenNamesSpiin classjava.util.prefs.AbstractPreferences- Returns:
- an array containing the names of the children of this preference node.
- Throws:
java.util.prefs.BackingStoreException- if this operation cannot be completed due to a failure in the backing store, or inability to communicate with it.
-
childSpi
protected IniPreferences.SectionPreferences childSpi(java.lang.String name)
Implements thechildSpimethod as per the specification inAbstractPreferences.childSpi(String).- Specified by:
childSpiin classjava.util.prefs.AbstractPreferences- Parameters:
name- child name- Returns:
- child node
-
flushSpi
protected void flushSpi() throws java.util.prefs.BackingStoreExceptionImplements theflushSpimethod as per the specification inAbstractPreferences.flushSpi(). This implementation does nothing.- Specified by:
flushSpiin classjava.util.prefs.AbstractPreferences- Throws:
java.util.prefs.BackingStoreException- if this operation cannot be completed due to a failure in the backing store, or inability to communicate with it.
-
keysSpi
protected java.lang.String[] keysSpi() throws java.util.prefs.BackingStoreExceptionImplements thekeysSpimethod as per the specification inAbstractPreferences.keysSpi(). This implementation allways return an empty array.- Specified by:
keysSpiin classjava.util.prefs.AbstractPreferences- Returns:
- an empty array.
- Throws:
java.util.prefs.BackingStoreException- if this operation cannot be completed due to a failure in the backing store, or inability to communicate with it.
-
putSpi
protected void putSpi(java.lang.String key, java.lang.String value) throws java.lang.UnsupportedOperationExceptionImplements theputSpimethod as per the specification inAbstractPreferences.putSpi(String,String). This implementation doesn;t support this operation, so allways throws UnsupportedOperationException.- Specified by:
putSpiin classjava.util.prefs.AbstractPreferences- Parameters:
key- key to set value forvalue- new value for key- Throws:
java.lang.UnsupportedOperationException- this implementation allways throws this exception
-
removeNodeSpi
protected void removeNodeSpi() throws java.util.prefs.BackingStoreException, java.lang.UnsupportedOperationExceptionImplements theremoveNodeSpimethod as per the specification inAbstractPreferences.removeNodeSpi(). This implementation doesn;t support this operation, so allways throws UnsupportedOperationException.- Specified by:
removeNodeSpiin classjava.util.prefs.AbstractPreferences- Throws:
java.lang.UnsupportedOperationException- this implementation allways throws this exceptionjava.util.prefs.BackingStoreException- this implementation never throws this exception
-
removeSpi
protected void removeSpi(java.lang.String key) throws java.lang.UnsupportedOperationExceptionImplements theremoveSpimethod as per the specification inAbstractPreferences.removeSpi(String).- Specified by:
removeSpiin classjava.util.prefs.AbstractPreferences- Parameters:
key- key to remove- Throws:
java.lang.UnsupportedOperationException- this implementation allways throws this exception
-
syncSpi
protected void syncSpi() throws java.util.prefs.BackingStoreExceptionImplements thesyncSpimethod as per the specification inAbstractPreferences.syncSpi(). This implementation does nothing.- Specified by:
syncSpiin classjava.util.prefs.AbstractPreferences- Throws:
java.util.prefs.BackingStoreException- if this operation cannot be completed due to a failure in the backing store, or inability to communicate with it.
-
-