public class FilePropertyMgr extends PropertyMgr
Property
does not trim whitespace from
values, so "x = y " will return "y ", which is hard to
debug).
ThreadSafety: This class is thread safe and can be used by multiple threads concurrently.
Constructor and Description |
---|
FilePropertyMgr(File propertyFile) |
Modifier and Type | Method and Description |
---|---|
String |
get(String name)
Returns the property associated with the specified key or null
if the property was not found.
|
static void |
main(String[] args) |
void |
save()
Saves any properties that were set previously.
|
String |
set(String name,
String value)
Sets the property associated with the specified key.
|
String |
toString()
Returns a description but the exact details of said description
are unspecified and subject to change.
|
get, getBoolean, getInt, getRequired, getRequiredBoolean, getRequiredInt, setUsage
public FilePropertyMgr(File propertyFile) throws IOException
IOException
public String get(String name)
PropertyMgr
get
in class PropertyMgr
name
- the property keypublic String set(String name, String value)
PropertyMgr
set
in class PropertyMgr
name
- the property keyvalue
- the property valuepublic void save() throws IOException
PropertyMgr
save
in class PropertyMgr
IOException
public String toString()