|
|||||||||||
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.tivoli.twg.libs.CommentedProperties
Subclass of standard java.util.Properties class, with support for preserving comments and order of properties.
Field Summary |
---|
Fields inherited from class java.util.Properties |
---|
defaults |
Constructor Summary | |
---|---|
CommentedProperties()
Creates an empty property list with no default values. |
|
CommentedProperties(java.util.Properties defaults)
Creates an empty property list with the specified defaults. |
Method Summary | |
---|---|
boolean |
addKeyComment(java.lang.String key,
java.lang.String comment)
Add comment for given property key |
void |
clear()
Clear all elements |
void |
load(java.io.InputStream instr)
Reads a property list from an input stream. |
void |
load(java.io.InputStream instr,
boolean allowBlanksInKey)
Reads a property list from an input stream. |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
Add or update element into set |
java.lang.Object |
remove(java.lang.Object key)
Remove element with given key value |
void |
store(java.io.OutputStream out,
java.lang.String header)
Stores this property list to the specified output stream. |
Methods inherited from class java.util.Properties |
---|
getProperty, getProperty, list, list, propertyNames, save, setProperty |
Methods inherited from class java.util.Hashtable |
---|
clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, putAll, rehash, size, toString, values |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public CommentedProperties()
public CommentedProperties(java.util.Properties defaults)
defaults
- the defaults.Method Detail |
public void load(java.io.InputStream instr) throws java.io.IOException
instr
- the input stream.
java.io.IOException
- if an error occurred when reading from the
input stream.public void load(java.io.InputStream instr, boolean allowBlanksInKey) throws java.io.IOException
instr
- the input stream.allowBlanksInKey
-
java.io.IOException
- if an error occurred when reading from the
input stream.public void store(java.io.OutputStream out, java.lang.String header) throws java.io.IOException
out
- an output stream.header
- a description of the property list.
java.io.IOException
public java.lang.Object put(java.lang.Object key, java.lang.Object value)
key
- - key valuevalue
- - value associated with key
public java.lang.Object remove(java.lang.Object key)
key
- - key value
public void clear()
public boolean addKeyComment(java.lang.String key, java.lang.String comment)
key
- - key valuecomment
- - comment string
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |