|
||||||||||
| 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
at.spardat.xma.boot.util.PropertyFile
PropertiesFile which automatically flushes its properties into its file.
| Field Summary |
| Fields inherited from class java.util.Properties |
defaults |
| Constructor Summary | |
PropertyFile(java.io.File file,
boolean debug)
ProertyFile backed by the specified "file" |
|
PropertyFile(java.io.File file,
java.lang.String header)
ProertyFile backed by the specified "file" |
|
| Method Summary | |
java.lang.String |
getProperty(java.lang.String key)
Returns the value of the specified key, or null if the key does not exist. |
java.lang.String |
getProperty(java.lang.String key,
java.lang.String defaultValue)
Returns the value of the specified key, or the default value if the key does not exist. |
java.io.File |
getStoreFile()
get the underlying file_ |
void |
load()
load from file_ |
java.lang.Object |
setProperty(java.lang.String key,
java.lang.String value)
Sets the value for the specified key and updates the corresponding .ifo file. |
java.lang.Object |
setPropertyNoflush(java.lang.String key,
java.lang.String value)
Sets the value for the specified key without updating the file now. |
void |
store()
Saves the properties to the file_. |
| Methods inherited from class java.util.Properties |
list, list, load, propertyNames, save, 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 |
| Constructor Detail |
public PropertyFile(java.io.File file,
java.lang.String header)
throws java.io.IOException
file - the file to save and load toheader - the file header
java.io.IOException - containing the filename
public PropertyFile(java.io.File file,
boolean debug)
throws java.io.IOException
file - the file to save and load todebug - if true trace information is writen into the log file
java.io.IOException - containing the filename| Method Detail |
public java.lang.String getProperty(java.lang.String key)
key - key to look for
public java.lang.String getProperty(java.lang.String key,
java.lang.String defaultValue)
public java.lang.Object setProperty(java.lang.String key,
java.lang.String value)
java.lang.RuntimeException - if the property could not be persisted
public java.lang.Object setPropertyNoflush(java.lang.String key,
java.lang.String value)
public java.io.File getStoreFile()
public void load()
throws java.io.IOException
java.io.IOException - containing the filename
public void store()
throws java.io.IOException
java.io.IOException - containing the filename
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||