|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrailo.commons.io.ini.IniFile
public final class IniFile
read a ini file and allow to modifie and read the data
Constructor Summary | |
---|---|
IniFile(InputStream is)
|
|
IniFile(Resource file)
Constructor for the IniFile object |
Method Summary | |
---|---|
String |
getKeyValue(String strSection,
String key)
Gets the KeyValue attribute of the IniFile object |
String |
getKeyValueEL(String strSection,
String key)
Gets the KeyValue attribute of the IniFile object, if not exist return null |
static Struct |
getProfileSections(Resource file)
|
Map |
getSection(String strSection)
Gets the Section attribute of the IniFile object |
Map |
getSectionEL(String strSection)
Gets the Section attribute of the IniFile object, return null if section not exist |
Map |
getSections()
Gets the Sections attribute of the IniFile object |
boolean |
isNullOrEmpty(String section,
String key)
Gets the NullOrEmpty attribute of the IniFile object |
void |
load(InputStream in)
loads the ini file |
void |
removeSection(String strSection)
removes a selection |
void |
save()
save back content to ini file |
void |
setKeyValue(String strSection,
String key,
String value)
Sets the KeyValue attribute of the IniFile object |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IniFile(Resource file) throws IOException
file
- ini FIle
IOException
public IniFile(InputStream is) throws IOException
IOException
Method Detail |
---|
public void setKeyValue(String strSection, String key, String value)
strSection
- the section to setkey
- the key of the new valuevalue
- the value to setpublic Map getSections()
public Map getSection(String strSection) throws IOException
strSection
- section name to get
IOException
public Map getSectionEL(String strSection)
strSection
- section name to get
public boolean isNullOrEmpty(String section, String key)
section
- section to checkkey
- key to check
public String getKeyValue(String strSection, String key) throws IOException
strSection
- section to getkey
- key to get
IOException
public String getKeyValueEL(String strSection, String key)
strSection
- section to getkey
- key to get
public void load(InputStream in) throws IOException
in
- inputstream to read
IOException
public void save() throws IOException
IOException
public void removeSection(String strSection)
strSection
- section to removepublic static Struct getProfileSections(Resource file) throws IOException
file
-
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |