public class IniFile
extends java.lang.Object
Constructor and Description |
---|
IniFile(java.lang.String _fn)
Construct an IniFile object.
|
Modifier and Type | Method and Description |
---|---|
void |
flush()
Write all internal data to the file.
|
java.util.Vector |
getKeys(java.lang.String section)
Get all keys for a section in the given ini file.
|
java.util.Vector |
getSections()
Get all sections for the given ini file.
|
java.util.Vector |
getSections(java.lang.String path)
Get all sections for the given ini file, matching the path.
|
java.lang.String |
getString(java.lang.String section,
java.lang.String key,
java.lang.String def)
Get a value for a keys in the section for the given ini file.
|
void |
read()
Read the file, parse it, and create an image in memory.
|
void |
setString(java.lang.String section,
java.lang.String key,
java.lang.String value)
Set a value for a keys in the section for the given ini file.
|
public IniFile(java.lang.String _fn)
_fn
- name of the used ini filepublic void read()
public void flush()
public java.util.Vector getSections()
public java.util.Vector getSections(java.lang.String path)
path
- the match Stringpublic java.util.Vector getKeys(java.lang.String section)
section
- the name of the sectionpublic java.lang.String getString(java.lang.String section, java.lang.String key, java.lang.String def)
section
- the name of the sectionkey
- the name of the keydef
- a default value, if the key was not foundsetString(java.lang.String, java.lang.String, java.lang.String)
public void setString(java.lang.String section, java.lang.String key, java.lang.String value)
section
- the name of the sectionkey
- the name of the keyvalue
- the new key valuegetString(java.lang.String, java.lang.String, java.lang.String)