public class PropertiesReader
extends java.lang.Object
| Constructor and Description |
|---|
PropertiesReader()
Creates pre-initialized instance of PropertiesReader.
|
PropertiesReader(java.lang.String strPropertiesFile)
Creates pre-initialized instance of PropertiesReader using the Properties
file path.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getProperty(java.lang.String strPropertyName)
Get properties from the Input Stream provided.
|
void |
setPropertiesFile(java.io.InputStream objStream)
Loads properties from the Input Stream provided.
|
void |
setPropertiesFile(java.lang.String strPropertiesFile)
Sets the properties file path and loads the properties from the file.
|
void |
setPropertyValue(java.lang.String key,
java.lang.String value)
Modify the value of key as set by the user and writes it in the property file.
|
public PropertiesReader(java.lang.String strPropertiesFile)
strPropertiesFile - Path of Properties Filepublic PropertiesReader()
public void setPropertiesFile(java.lang.String strPropertiesFile)
strPropertiesFile - String value of properties complete file path.public void setPropertiesFile(java.io.InputStream objStream)
objStream - instance of Input Stream.public java.lang.String getProperty(java.lang.String strPropertyName)
strPropertyName - the property keypublic void setPropertyValue(java.lang.String key,
java.lang.String value)
key - the key in properties file.value - - the value which is to be set for the specified key.