public class CommentedProperties extends Properties
| Modifier and Type | Field and Description |
|---|---|
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'
|
defaults| Constructor and Description |
|---|
CommentedProperties() |
CommentedProperties(Properties defaults) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
getProperty, getProperty, list, list, load, loadFromXML, propertyNames, save, setProperty, store, storeToXML, storeToXML, stringPropertyNamespublic Vector lineData
public Vector keyData
public CommentedProperties()
public CommentedProperties(Properties defaults)
defaults - public static void editPropertyFromClassPathRessource(String classPathRessource, String key, String value)
public void load(InputStream inStream) throws IOException
load in class PropertiesinStream - The InputStream to read.IOExceptionpublic void store(OutputStream out, String header) throws IOException
store in class Propertiesout - The OutputStream to write to.header - Ignored, here for compatability w/ Properties.IOExceptionpublic 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.Copyright © 2015. All rights reserved.