|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ccl.util.IniFile
This class is copyrighted by 1996 Besiex Software (Benjarmin Cabell) and distributed under the terms of the Gnu Library General Public License. This class reads Windows like .ini files and can set values as well. The standard Java way is to use property files instead, but if you have legacy code which uses ini files or if you want to access for example a kde .kderc configuration file, then this class is for you.
Field Summary | |
static int |
FILE_ERROR
Reading the ini file resulted in an error. |
static int |
KEY_ERROR
Reading the ini file resulted in an error when parsing for a key. |
static int |
OK
Indicates that reading the ini file worked fine. |
static int |
SECTION_ERROR
Reading the ini file resulted in an error when parsing a section. |
Constructor Summary | |
IniFile()
|
Method Summary | |
static java.lang.String |
getKeyValue(java.lang.String sIniFullFileName_,
java.lang.String sSectionName_,
java.lang.String sKey_)
|
static java.lang.String |
getKeyValue(java.lang.String sIniFullFileName_,
java.lang.String sSectionName_,
java.lang.String sKey_,
java.lang.String sIniFileContent_)
Returns the value for the given key in the given section. |
static java.lang.String |
getKeyValueFromString(java.lang.String sSectionName_,
java.lang.String sKey_,
java.lang.String sIniFileContent_)
Returns the value for the given key in the given String. |
static int |
getStatus()
Ini file status indicates any problems. |
static void |
setKeyValue(java.lang.String sIniFileName_,
java.lang.String sSection_,
java.lang.String sKey_,
java.lang.String sValue_)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int OK
public static final int FILE_ERROR
public static final int SECTION_ERROR
public static final int KEY_ERROR
Constructor Detail |
public IniFile()
Method Detail |
public static java.lang.String getKeyValue(java.lang.String sIniFullFileName_, java.lang.String sSectionName_, java.lang.String sKey_)
public static java.lang.String getKeyValue(java.lang.String sIniFullFileName_, java.lang.String sSectionName_, java.lang.String sKey_, java.lang.String sIniFileContent_)
sIniFullFileName_
- (The foolowing comment is outdated: is not used if sIniFullFileName_ is not
equal null. Besides of that it's only
there to separate the method signature from
getKeyValue(String,String,String)
- what a hack.)sIniFileContent_
- (The foolowing comment is outdated:
if null it's the same as getKeyValue(String,
String,String). Otherwise it workes straight
on this String.)public static java.lang.String getKeyValueFromString(java.lang.String sSectionName_, java.lang.String sKey_, java.lang.String sIniFileContent_)
public static int getStatus()
public static void setKeyValue(java.lang.String sIniFileName_, java.lang.String sSection_, java.lang.String sKey_, java.lang.String sValue_)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |