|
||||||||||
| 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 (java.util.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(java.io.File propertyFile)
|
|
| Method Summary | |
|---|---|
java.lang.String |
get(java.lang.String name)
Returns the property associated with the specified key or null if the property was not found. |
static void |
main(java.lang.String[] args)
|
void |
save()
Saves any properties that were set previously. |
java.lang.String |
set(java.lang.String name,
java.lang.String value)
Sets the property associated with the specified key. |
java.lang.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(java.io.File propertyFile)
throws java.io.IOException
java.io.IOException| Method Detail |
|---|
public java.lang.String get(java.lang.String name)
PropertyMgr
get in class PropertyMgrname - the property key
public java.lang.String set(java.lang.String name,
java.lang.String value)
PropertyMgr
set in class PropertyMgrname - the property keyvalue - the property value
public void save()
throws java.io.IOException
PropertyMgr
save in class PropertyMgrjava.io.IOExceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||