public class ConfigurationFile extends Object
Constructor and Description |
---|
ConfigurationFile(File configurationFile)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
getParameterLine(String parameterName)
Returns a parameter line corresponding to the given parameter name.
|
void |
setParameter(String parameterName,
String value)
Sets the value for a given parameter.
|
public ConfigurationFile(File configurationFile)
configurationFile
- a file where to save the configurationpublic void setParameter(String parameterName, String value) throws FileNotFoundException, IOException
parameterName
- the name of the parameter of interestvalue
- the value to setFileNotFoundException
- exception thrown whenever the connection to
the file was dropped before execution is finishedIOException
- exception thrown whenever an error occurred while
reading or writing to the filepublic String getParameterLine(String parameterName) throws FileNotFoundException, IOException
parameterName
- the name of the parameter of interestFileNotFoundException
- exception thrown when the connection to the
file is broken while readingIOException
- exception thrown whenever an error occurred while
reading the fileCopyright © 2016. All rights reserved.