|
||||||||||
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<Object,Object>
java.util.Properties
com.gisgraphy.helper.CommentedProperties
public class CommentedProperties
The CommentedProperties class is an extension of java.util.Properties to allow retention of comment lines and blank (whitespace only) lines in the properties file. Written for Java version 1.4
Field Summary | |
---|---|
Vector |
keyData
Use a Vector to keep a copy of lines containing a key, i.e. they are a property. |
Vector |
lineData
Use a Vector to keep a copy of lines that are a comment or 'blank' |
Fields inherited from class java.util.Properties |
---|
defaults |
Constructor Summary | |
---|---|
CommentedProperties()
|
|
CommentedProperties(Properties defaults)
|
Method Summary | |
---|---|
void |
add(String keyString,
String value)
Add a Property to the end of the CommentedProperties. |
void |
addLine(String line)
Add a comment or blank line or comment to the end of the CommentedProperties. |
static void |
editProperty(String filePath,
String key,
String value)
|
static void |
editPropertyFromClassPathRessource(String classPathRessource,
String key,
String value)
|
void |
load(InputStream inStream)
Load properties from the specified InputStream. |
void |
store(OutputStream out,
String header)
Write the properties to the specified OutputStream. |
Methods inherited from class java.util.Properties |
---|
getProperty, getProperty, list, list, load, loadFromXML, propertyNames, save, setProperty, store, storeToXML, storeToXML, stringPropertyNames |
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 |
---|
public Vector lineData
public Vector keyData
Constructor Detail |
---|
public CommentedProperties()
public CommentedProperties(Properties defaults)
defaults
- Method Detail |
---|
public static void editProperty(String filePath, String key, String value)
public static void editPropertyFromClassPathRessource(String classPathRessource, String key, String value)
public void load(InputStream inStream) throws IOException
load
in class Properties
inStream
- The InputStream to read.
IOException
public void store(OutputStream out, String header) throws IOException
store
in class Properties
out
- The OutputStream to write to.header
- Ignored, here for compatability w/ Properties.
IOException
public void add(String keyString, String value)
keyString
- The Property key.value
- The value of this Property.public void addLine(String line)
line
- The string to add to the end, make sure this is a comment
or a 'whitespace' line.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |