|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Dictionary<K,V>
java.util.Hashtable<java.lang.Object,java.lang.Object>
java.util.Properties
com.darwinsys.util.FileProperties
public class 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.io.InputStream is)
|
|
FileProperties(java.lang.String loadsaveFileName)
Construct a FileProperties given a fileName. |
|
FileProperties(java.lang.String readonlyFileName,
java.lang.Class clazz)
|
|
FileProperties(java.lang.String loadsaveFileName,
java.util.Properties defProp)
Construct a FileProperties given a fileName and a list of default properties. |
|
| Method Summary | |
|---|---|
java.lang.String |
getFileName()
|
java.util.Iterator<java.lang.String> |
iterator()
|
java.util.Properties |
load()
Load the properties from the saved filename. |
void |
save()
Deprecated. Use store(OutputStream) instead. |
| Methods inherited from class java.util.Properties |
|---|
getProperty, getProperty, list, list, load, loadFromXML, propertyNames, save, setProperty, store, storeToXML, storeToXML |
| 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
java.io.IOException
public FileProperties(java.lang.String readonlyFileName,
java.lang.Class clazz)
throws java.io.IOException
java.io.IOException
public FileProperties(java.io.InputStream is)
throws java.io.IOException
java.io.IOException
public FileProperties(java.lang.String loadsaveFileName,
java.util.Properties defProp)
throws java.io.IOException
java.io.IOException| Method Detail |
|---|
public java.lang.String getFileName()
public java.util.Properties load()
throws java.io.IOException
java.io.IOException
@Deprecated
public void save()
throws java.io.IOException
java.io.IOExceptionpublic java.util.Iterator<java.lang.String> iterator()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||