|
EAF 7.6 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ConfigFileInterface
ConfigFileInterface is used to manipulate application's configuration files.
Config
Field Summary | |
---|---|
static java.lang.String |
TRAILING_COMMENT
The key under which the trailing comment is stored. |
Method Summary | |
---|---|
void |
addEntry(java.lang.String key,
java.lang.String[] values,
java.lang.String comment)
Add an entry to the config file. |
void |
addEntry(java.lang.String key,
java.lang.String value,
java.lang.String comment)
Add an entry to the config file. |
java.lang.String |
getComment(java.lang.String key)
Returns the comment associated with a given key, or null if
there is no comment. |
com.lutris.util.Config |
getConfig()
Returns the Config object representing the config data in the file. |
java.io.File |
getFile()
Gets the associated file. |
void |
removeEntry(java.lang.String key)
Remove an entry from the config file. |
void |
setFile(java.io.File file)
Sets the configuration file. |
void |
write()
Writes this config to the associated file. |
void |
write(java.io.OutputStream outputStream)
Writes out a config file to the OutputStream specified. |
Field Detail |
---|
static final java.lang.String TRAILING_COMMENT
Method Detail |
---|
com.lutris.util.Config getConfig()
java.lang.String getComment(java.lang.String key)
null
if
there is no comment. Pass in* ConfigFileInterface.TRAILING_COMMENT
to get
the trailing comment.
key
- the key to look up.
null
void addEntry(java.lang.String key, java.lang.String[] values, java.lang.String comment) throws KeywordValueException
key
- The config element name.values
- A string array of values.comment
- A string containing a properly commented config file comment.
KeywordValueException
void addEntry(java.lang.String key, java.lang.String value, java.lang.String comment) throws KeywordValueException
key
- The config element name.value
- A String value.comment
- A string containing a properly commented config file comment.
KeywordValueException
void removeEntry(java.lang.String key) throws KeywordValueException
key
- The config element name.
KeywordValueException
java.io.File getFile()
null
is returned.
void setFile(java.io.File file)
file
- given reference to configuration file represented as File object.void write() throws java.io.IOException, java.io.FileNotFoundException
FileNotFoundException
java.io.IOException
java.io.FileNotFoundException
void write(java.io.OutputStream outputStream)
outputStream
- The output stream on which to write the config file.
|
EAF 7.6 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |