|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Dictionary
java.util.Hashtable
java.util.Properties
com.darwinsys.util.FileProperties
The FileProperties
class extends Properties
,
"a persistent set of properties [that] can be saved to a stream
or loaded from a stream". This subclass attends to all the mundane
details of opening the Stream(s) for actually saving and loading
the Properties.
This subclass preserves the useful feature that a property list can contain another property list as its "defaults"; this second property list is searched if the property key is not found in the original property list.
Field Summary | |
protected java.lang.String |
fileName
The name of the file this FileProperties represents. |
Fields inherited from class java.util.Properties |
defaults |
Constructor Summary | |
FileProperties(java.lang.String loadsaveFileName)
Construct a FileProperties given a fileName. |
|
FileProperties(java.lang.String loadsaveFileName,
java.util.Properties defProp)
Construct a FileProperties given a fileName and a list of default properties. |
Method Summary | |
void |
close()
Deprecated. No longer needed. |
java.lang.String |
getFileName()
|
java.util.Properties |
load()
Load the properties from the saved filename. |
void |
save()
Save the properties to disk for later loading. |
Methods inherited from class java.util.Properties |
getProperty, getProperty, list, list, load, propertyNames, save, setProperty, store |
Methods inherited from class java.util.Hashtable |
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.lang.String fileName
Constructor Detail |
public FileProperties(java.lang.String loadsaveFileName) throws java.io.IOException
public FileProperties(java.lang.String loadsaveFileName, java.util.Properties defProp) throws java.io.IOException
Method Detail |
public java.lang.String getFileName()
public java.util.Properties load() throws java.io.IOException
java.io.IOException
public void save() throws java.io.IOException
java.io.IOException
public void close()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |