Class FilePropertyMgr
java.lang.Object
fc.util.PropertyMgr
fc.util.FilePropertyMgr
Loads properties from a file. Trims whitespace from
property values, in contrast to (
does not trim whitespace from
values, so "x = y " will return "y ", which is hard to
debug).
invalid reference
java.util.Property
ThreadSafety: This class is thread safe and can be used by multiple threads concurrently.
- Version:
- 1.1 5/31/2002
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the property associated with the specified key or null if the property was not found.static void
void
save()
Saves any properties that were set previously.Sets the property associated with the specified key.toString()
Returns a description but the exact details of said description are unspecified and subject to change.Methods inherited from class PropertyMgr
get, getBoolean, getInt, getRequired, getRequiredBoolean, getRequiredInt, setUsage
-
Constructor Details
-
FilePropertyMgr
- Throws:
IOException
-
-
Method Details
-
get
Description copied from class:PropertyMgr
Returns the property associated with the specified key or null if the property was not found.- Specified by:
get
in classPropertyMgr
- Parameters:
name
- the property key
-
set
Description copied from class:PropertyMgr
Sets the property associated with the specified key.- Specified by:
set
in classPropertyMgr
- Parameters:
name
- the property keyvalue
- the property value- Returns:
- the previous value of the specified key or null if it did not have one.
-
save
Description copied from class:PropertyMgr
Saves any properties that were set previously. This method does not need to be called if properties were only read, however if any property was modified or added, it is essential to call this method to save any such changes.- Specified by:
save
in classPropertyMgr
- Throws:
IOException
-
toString
-
main
-