public class SyncedPropertiesFile extends Object
Constructor and Description |
---|
SyncedPropertiesFile(File propertiesFile,
Properties defaults)
Create a synced properties file.
|
Modifier and Type | Method and Description |
---|---|
String |
getProperty(String key)
Get the property value for the given key.
|
String |
getPropertyQuiet(String key)
Get the property value for the given key.
|
void |
setProperty(String key,
String value)
Set the property value for the given key.
|
void |
setPropertyQuiet(String key,
String value)
Set the property value for the given key.
|
public SyncedPropertiesFile(File propertiesFile, Properties defaults) throws IOException
propertiesFile
- the properties filedefaults
- the default properties, may be null
IOException
- if reading the file failspublic String getProperty(String key) throws IOException
key
- the property keynull
if no default is foundIOException
- if syncing with the file fails.public String getPropertyQuiet(String key)
key
- the property keynull
if no default is foundpublic void setProperty(String key, String value) throws IOException
key
- the property keyvalue
- the property valueIOException
- if syncing with the file fails.Build 2013-10-07_11-27-38
Revision 99b27713a799a59a21b0b166eaaea8aaefbf125a