Constructor and Description |
---|
IniFile(InputStream is) |
IniFile(Resource file)
Constructor for the IniFile object
|
Modifier and Type | Method and Description |
---|---|
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
|
public IniFile(Resource file) throws IOException
file
- ini FIleIOException
public IniFile(InputStream is) throws IOException
IOException
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 getIOException
public Map getSectionEL(String strSection)
strSection
- section name to getpublic boolean isNullOrEmpty(String section, String key)
section
- section to checkkey
- key to checkpublic String getKeyValue(String strSection, String key) throws IOException
strSection
- section to getkey
- key to getIOException
public String getKeyValueEL(String strSection, String key)
strSection
- section to getkey
- key to getpublic void load(InputStream in) throws IOException
in
- inputstream to readIOException
public void save() throws IOException
IOException
public void removeSection(String strSection)
strSection
- section to removepublic static Struct getProfileSections(Resource file) throws IOException
file
- IOException
Copyright © 2015 Lucee