|
Oracle | ||||||||
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.compoze.util.ObjectProperties
com.compoze.util.MutableProperties
com.compoze.util.FileProperties
public class FileProperties
A Properties object that gets its Properties from a file. It checks on the fly to see if the file has been modified to re-read the Properties.
Properties
,
Serialized FormField Summary | |
---|---|
protected static int |
DEFAULT_CHECK_INTERVAL
|
Fields inherited from class java.util.Properties |
---|
defaults |
Constructor Summary | |
---|---|
FileProperties(java.io.File propsFile)
Constructor. |
|
FileProperties(java.io.File propsFile,
long lPropsFileCheckInterval)
Constructor. |
|
FileProperties(java.io.File propsFile,
long lPropsFileCheckInterval,
java.util.Properties defaults)
Constructor. |
|
FileProperties(java.io.File propsFile,
java.util.Properties defaults)
Constructor. |
Method Summary | |
---|---|
java.lang.String |
getProperty(java.lang.String sKey)
Get a property. |
java.lang.String |
getProperty(java.lang.String sKey,
java.lang.String sDefaultValue)
Get a property. |
void |
list(java.io.PrintStream out)
Prints this property list out to the specified output stream. |
void |
list(java.io.PrintWriter writer)
Prints this property list out to the specified output stream. |
static void |
main(java.lang.String[] args)
Exerciser. |
java.util.Enumeration |
propertyNames()
Get an Enumeration of the property names. |
void |
refresh()
Force a re-load of the properties. |
void |
setCheckInterval(long lCheckInterval)
Set the check for updates interval for the file. |
Methods inherited from class com.compoze.util.MutableProperties |
---|
setConfiguration |
Methods inherited from class com.compoze.util.ObjectProperties |
---|
getBoolean, getBoolean, getByte, getByte, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getLong, getLong, getShort, getShort, getString, getString, getStringArray, getStringArray, getStringArray, replaceSubstitutions |
Methods inherited from class java.util.Properties |
---|
load, loadFromXML, 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 static final int DEFAULT_CHECK_INTERVAL
Constructor Detail |
---|
public FileProperties(java.io.File propsFile, long lPropsFileCheckInterval)
propsFile
- the file from which the Properties are readlPropsFileCheckInterval
- a checking interval (in milliseconds) for the filepublic FileProperties(java.io.File propsFile, long lPropsFileCheckInterval, java.util.Properties defaults)
propsFile
- the file from which the Properties are readlPropsFileCheckInterval
- a checking interval (in milliseconds) for the filedefaults
- a list of defaults used when a Property is not foundpublic FileProperties(java.io.File propsFile)
propsFile
- the file from which the Properties are readpublic FileProperties(java.io.File propsFile, java.util.Properties defaults)
propsFile
- the file from which the Properties are readdefaults
- a list of defaults used when a Property is not foundMethod Detail |
---|
public void setCheckInterval(long lCheckInterval)
lCheckInterval
- interval to check (in milliseconds)public java.lang.String getProperty(java.lang.String sKey)
getProperty
in class MutableProperties
sKey
- the key to get the property for
public java.lang.String getProperty(java.lang.String sKey, java.lang.String sDefaultValue)
getProperty
in class MutableProperties
sKey
- the key to get the property forsDefaultValue
- the default value in case the key is not found
public void list(java.io.PrintStream out)
list
in class java.util.Properties
out
- the PrintStream to write topublic void list(java.io.PrintWriter writer)
list
in class java.util.Properties
writer
- the Writer to write topublic java.util.Enumeration propertyNames()
propertyNames
in class MutableProperties
public void refresh()
public static void main(java.lang.String[] args)
args
- arguments - first is properties file and each
additional is a key
|
Oracle | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |