|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfc.util.PropertyMgr
fc.util.FilePropertyMgr
public class FilePropertyMgr
Loads properties from a file. Trims whitespace from
property values, in contrast to (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 Summary | |
|---|---|
FilePropertyMgr(File propertyFile)
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class fc.util.PropertyMgr |
|---|
get, getBoolean, getInt, getRequired, getRequiredBoolean, getRequiredInt, setUsage |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FilePropertyMgr(File propertyFile)
throws IOException
IOException| Method Detail |
|---|
public String get(String name)
PropertyMgr
get in class PropertyMgrname - the property key
public String set(String name,
String value)
PropertyMgr
set in class PropertyMgrname - the property keyvalue - the property value
public void save()
throws IOException
PropertyMgr
save in class PropertyMgrIOExceptionpublic String toString()
toString in class Objectpublic static void main(String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||