public class ExtendedProperties extends Properties
| Modifier and Type | Field and Description |
|---|---|
protected String |
commentPrefix
The prefix of the comment in the Properties file.
|
defaults| Constructor and Description |
|---|
ExtendedProperties()
Extended Properties constructor
|
ExtendedProperties(ExtendedProperties exProp)
Create an ExtendedProperties with a Allready filled ExtendedProperty list.
|
ExtendedProperties(String filename)
Create and read an ExtendedProperty from file.
|
| Modifier and Type | Method and Description |
|---|---|
Vector<String> |
getPropertyValues(String whichProp,
String delimeter)
return a Vector of Strings which is parsed from a specified Property.
|
void |
getProps(String filename)
Read to this Property, the Properties from a file.
|
void |
load(InputStream inputStream)
Loads properties from an InputStream.
|
Hashtable<Object,Object> |
readProperties(String filename)
Read from Properties and return them.
|
String |
save() |
void |
save(String filename)
This routine does not only saves your Properties but also
merges your comments if the file already exists
if the file doesn't exists the will call the "normal" write routine.
|
void |
saveProperties(String filename,
Hashtable<Object,Object> propsToSave)
save Properties to file.
|
Object |
setProperty(String name,
String value)
Set the Property.
|
void |
showContents()
Dump the contents of this Property to your screen (for debugging)
|
getProperty, getProperty, list, list, load, loadFromXML, propertyNames, save, store, store, storeToXML, storeToXML, stringPropertyNamesclear, clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keys, keySet, merge, put, putAll, putIfAbsent, rehash, remove, remove, replace, replace, replaceAll, size, toString, valuesprotected String commentPrefix
public ExtendedProperties()
public ExtendedProperties(String filename)
filename - The file from were to read.public ExtendedProperties(ExtendedProperties exProp)
exProp - The list that will be put in this ExtendedProperty.public Hashtable<Object,Object> readProperties(String filename)
filename - The file from were to read the Properties.public void saveProperties(String filename, Hashtable<Object,Object> propsToSave)
filename - The File were to save thempropsToSave - The Properties which to save.public Vector<String> getPropertyValues(String whichProp, String delimeter)
whichProp - The Property to get the list from.delimeter - The delimeter to split wichProp's value with.public void getProps(String filename) throws IOException
filename - The file were to read fromIOExceptionpublic void load(InputStream inputStream) throws IOException
load in class Propertiesin - the input streamIOException - Error when reading from input stream.public void save(String filename) throws IOException
filename - The file were to save to.IOExceptionpublic Object setProperty(String name, String value)
setProperty in class Propertiesname - the name of the Property (the part in front of the '=' in the Property file)value - the (new) value of the Property (the part after the '=' in the Property file)public void showContents()
public String save()
MMBase 1.9-SNAPSHOT - ${javadoctimestamp}