Package org.ini4j
Class IniPreferences
Object
Preferences
AbstractPreferences
org.ini4j.IniPreferences
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class java.util.prefs.AbstractPreferences
lock, newNodeFields inherited from class java.util.prefs.Preferences
MAX_KEY_LENGTH, MAX_NAME_LENGTH, MAX_VALUE_LENGTH -
Constructor Summary
ConstructorsConstructorDescriptionIniPreferences(InputStream input) Constructs a new preferences node based on newly loadedIniinstance.IniPreferences(Reader input) Constructs a new preferences node based on newly loadedIniinstance.IniPreferences(URL input) Constructs a new preferences node based on newly loadedIniinstance.IniPreferences(Ini ini) Constructs a new preferences node on top ofIniinstance. -
Method Summary
Modifier and TypeMethodDescriptionprotected String[]Implements thechildrenNamesSpimethod as per the specification inAbstractPreferences.childrenNamesSpi().protected IniPreferences.SectionPreferencesImplements 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 StringImplements thegetSpimethod as per the specification inAbstractPreferences.getSpi(String).protected String[]keysSpi()Implements thekeysSpimethod as per the specification inAbstractPreferences.keysSpi().protected voidImplements theputSpimethod as per the specification inAbstractPreferences.putSpi(String,String).protected voidImplements theremoveNodeSpimethod as per the specification inAbstractPreferences.removeNodeSpi().protected voidImplements 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, toStringMethods inherited from class java.util.prefs.Preferences
importPreferences, systemNodeForPackage, systemRoot, userNodeForPackage, userRoot
-
Constructor Details
-
IniPreferences
Constructs a new preferences node on top ofIniinstance.- Parameters:
ini- underlayingIniinstance
-
IniPreferences
Constructs a new preferences node based on newly loadedIniinstance. This is just a helper constructor, to make simpler constructingIniPreferencesdirectly fromReader.- Parameters:
input- theReadercontainingInidata- Throws:
IOException- if an I/O error occuredInvalidFileFormatException- ifIniparsing error occured
-
IniPreferences
Constructs a new preferences node based on newly loadedIniinstance. This is just a helper constructor, to make simpler constructingIniPreferencesdirectly fromInputStream.- Parameters:
input- theInputStreamcontainingInidata- Throws:
IOException- if an I/O error occuredInvalidFileFormatException- ifIniparsing error occured
-
IniPreferences
Constructs a new preferences node based on newly loadedIniinstance. This is just a helper constructor, to make simpler constructingIniPreferencesdirectly fromURL.- Parameters:
input- theURLcontainingInidata- Throws:
IOException- if an I/O error occuredInvalidFileFormatException- ifIniparsing error occured
-
-
Method Details
-
getIni
Provide access to underlayingIniimplementation.- Returns:
Iniimplementation
-
getSpi
Implements thegetSpimethod as per the specification inAbstractPreferences.getSpi(String). This implementation doesn't support this operation, so allways throws UnsupportedOperationException.- Specified by:
getSpiin classAbstractPreferences- 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:
UnsupportedOperationException- this implementation allways throws this exception
-
childrenNamesSpi
Implements thechildrenNamesSpimethod as per the specification inAbstractPreferences.childrenNamesSpi().- Specified by:
childrenNamesSpiin classAbstractPreferences- Returns:
- an array containing the names of the children of this preference node.
- Throws:
BackingStoreException- if this operation cannot be completed due to a failure in the backing store, or inability to communicate with it.
-
childSpi
Implements thechildSpimethod as per the specification inAbstractPreferences.childSpi(String).- Specified by:
childSpiin classAbstractPreferences- Parameters:
name- child name- Returns:
- child node
-
flushSpi
Implements theflushSpimethod as per the specification inAbstractPreferences.flushSpi(). This implementation does nothing.- Specified by:
flushSpiin classAbstractPreferences- Throws:
BackingStoreException- if this operation cannot be completed due to a failure in the backing store, or inability to communicate with it.
-
keysSpi
Implements thekeysSpimethod as per the specification inAbstractPreferences.keysSpi(). This implementation allways return an empty array.- Specified by:
keysSpiin classAbstractPreferences- Returns:
- an empty array.
- Throws:
BackingStoreException- if this operation cannot be completed due to a failure in the backing store, or inability to communicate with it.
-
putSpi
Implements theputSpimethod as per the specification inAbstractPreferences.putSpi(String,String). This implementation doesn;t support this operation, so allways throws UnsupportedOperationException.- Specified by:
putSpiin classAbstractPreferences- Parameters:
key- key to set value forvalue- new value for key- Throws:
UnsupportedOperationException- this implementation allways throws this exception
-
removeNodeSpi
Implements theremoveNodeSpimethod as per the specification inAbstractPreferences.removeNodeSpi(). This implementation doesn;t support this operation, so allways throws UnsupportedOperationException.- Specified by:
removeNodeSpiin classAbstractPreferences- Throws:
UnsupportedOperationException- this implementation allways throws this exceptionBackingStoreException- this implementation never throws this exception
-
removeSpi
Implements theremoveSpimethod as per the specification inAbstractPreferences.removeSpi(String).- Specified by:
removeSpiin classAbstractPreferences- Parameters:
key- key to remove- Throws:
UnsupportedOperationException- this implementation allways throws this exception
-
syncSpi
Implements thesyncSpimethod as per the specification inAbstractPreferences.syncSpi(). This implementation does nothing.- Specified by:
syncSpiin classAbstractPreferences- Throws:
BackingStoreException- if this operation cannot be completed due to a failure in the backing store, or inability to communicate with it.
-