|
Reality Interface Classes | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.northgateis.util
Class IniFiles
java.lang.Object | +--com.northgateis.util.IniFiles
- public class IniFiles
- extends java.lang.Object
- implements java.util.Enumeration
- extends java.lang.Object
Defines an object that represents a Windows style ini file.
Provides methods to load and save the object in standard ini file format.
Constructor Summary | |
IniFiles(java.lang.String inifile)
Construct a new IniFiles object referencing an actual file on disk. |
Method Summary | |
java.util.Enumeration | elements() Create a list of all sections within the ini file |
boolean | getBoolValue(java.lang.String OB,
java.lang.String Begriff) Get boolean ini file value. |
int | getIntValue(java.lang.String OB,
java.lang.String Begriff) Get integer ini file value. |
long | getLongValue(java.lang.String OB,
java.lang.String Begriff) Get long ini file value. |
java.lang.String | getValue(java.lang.String OB,
java.lang.String Begriff) Get String ini file value. |
boolean | hasMoreElements() Test if ini file has more elements |
boolean | loadIni() Load an ini file from the specified file into this object using the current file spec. |
void | loadIni(java.lang.String f) Load an ini file from the specified file into this object. |
java.lang.Object | nextElement() Get next section name from list |
int | numElements() Get number of sections in ini file |
void | remove(java.lang.String OB) Remove geiven section from ini file |
void | saveIni() Save current object to default file. |
void | saveIni(java.lang.String file) Save current object to given ini file. |
void | setValue(java.lang.String OB,
java.lang.String Begriff,
boolean Eintrag) Set ini file value to a boolean. |
void | setValue(java.lang.String OB,
java.lang.String Begriff,
int Eintrag) Set ini file value to a integer. |
void | setValue(java.lang.String OB,
java.lang.String Begriff,
long Eintrag) Set ini file value to a long. |
void | setValue(java.lang.String OB,
java.lang.String Begriff,
java.lang.String Eintrag) Set ini file value to a String. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
IniFiles
public IniFiles(java.lang.String inifile)
- Construct a new IniFiles object referencing an actual file on disk.
- Parameters:
iniFile
- Path to ini file
Method Detail |
loadIni
public void loadIni(java.lang.String f)
- Load an ini file from the specified file into this object.
Specified file becomes the default for this object.
- Parameters:
iniFile
- Path to ini file
loadIni
public boolean loadIni()
- Load an ini file from the specified file into this object using the
current file spec.
saveIni
public void saveIni(java.lang.String file)
- Save current object to given ini file.
Specified file becomes the default for this object.
- Parameters:
iniFile
- Path to ini file
saveIni
public void saveIni()
- Save current object to default file.
setValue
public void setValue(java.lang.String OB, java.lang.String Begriff, boolean Eintrag)
- Set ini file value to a boolean.
- Parameters:
OB
- Section nameBegriff
- Value nameEintrag
- Value.
setValue
public void setValue(java.lang.String OB, java.lang.String Begriff, int Eintrag)
- Set ini file value to a integer.
- Parameters:
OB
- Section nameBegriff
- Value nameEintrag
- Value.
setValue
public void setValue(java.lang.String OB, java.lang.String Begriff, long Eintrag)
- Set ini file value to a long.
- Parameters:
OB
- Section nameBegriff
- Value nameEintrag
- Value.
setValue
public void setValue(java.lang.String OB, java.lang.String Begriff, java.lang.String Eintrag)
- Set ini file value to a String.
- Parameters:
OB
- Section nameBegriff
- Value nameEintrag
- Value.
getBoolValue
public boolean getBoolValue(java.lang.String OB, java.lang.String Begriff)
- Get boolean ini file value.
- Parameters:
OB
- Section nameBegriff
- Value name
getIntValue
public int getIntValue(java.lang.String OB, java.lang.String Begriff)
- Get integer ini file value.
- Parameters:
OB
- Section nameBegriff
- Value name
getLongValue
public long getLongValue(java.lang.String OB, java.lang.String Begriff)
- Get long ini file value.
- Parameters:
OB
- Section nameBegriff
- Value name
getValue
public java.lang.String getValue(java.lang.String OB, java.lang.String Begriff)
- Get String ini file value.
- Parameters:
OB
- Section nameBegriff
- Value name
remove
public void remove(java.lang.String OB)
- Remove geiven section from ini file
- Parameters:
OB
- Section name
elements
public java.util.Enumeration elements()
- Create a list of all sections within the ini file
- Returns:
- An enumeration object used to access the list of section names in the ini file.
hasMoreElements
public boolean hasMoreElements()
- Test if ini file has more elements
- Specified by:
- hasMoreElements in interface java.util.Enumeration
- Returns:
- Name of next section in inifile (String)
nextElement
public java.lang.Object nextElement()
- Get next section name from list
- Specified by:
- nextElement in interface java.util.Enumeration
numElements
public int numElements()
- Get number of sections in ini file
- Returns:
- Number of sections in ini file
Reality Interface Classes | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (c) 2000 NEC Software Services (UK) Limited