| java.util.Properties org.mmbase.util.ExtendedProperties
ExtendedProperties | public class ExtendedProperties extends Properties (Code) | | This is a flexible Properties version, it can handle saving of Properties with
the comments that will stay in your file.
author: Jan van Oosterom version: $Id: ExtendedProperties.java,v 1.11 2007/02/24 21:57:50 nklasens Exp $ |
commentPrefix | protected String commentPrefix(Code) | | The prefix of the comment in the Properties file.
Everything after it will be treaded as comment
|
ExtendedProperties | public ExtendedProperties()(Code) | | Extended Properties constructor
|
ExtendedProperties | public ExtendedProperties(String filename)(Code) | | Create and read an ExtendedProperty from file.
Parameters: filename - The file from were to read. |
ExtendedProperties | public ExtendedProperties(ExtendedProperties exProp)(Code) | | Create an ExtendedProperties with a Allready filled ExtendedProperty list.
Parameters: exProp - The list that will be put in this ExtendedProperty. |
getPropertyValues | public Vector<String> getPropertyValues(String whichProp, String delimeter)(Code) | | return a Vector of Strings which is parsed from a specified Property.
Parameters: whichProp - The Property to get the list from. Parameters: delimeter - The delimeter to split wichProp's value with. |
getProps | public void getProps(String filename) throws IOException(Code) | | Read to this Property, the Properties from a file.
Parameters: filename - The file were to read from |
load | public synchronized void load(InputStream in) throws IOException(Code) | | Loads properties from an InputStream.
Uses "=" as delimeter between key and value.
Does not uses a ":" as delimiter!
Parameters: in - the input stream exception: IOException - Error when reading from input stream. |
readProperties | public Hashtable<Object, Object> readProperties(String filename)(Code) | | Read from Properties and return them.
Parameters: filename - The file from were to read the Properties. |
save | public synchronized void save(String filename) throws IOException(Code) | | 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.
Parameters: filename - The file were to save to. |
saveProperties | public synchronized void saveProperties(String filename, Hashtable<Object, Object> propsToSave)(Code) | | save Properties to file.
Parameters: filename - The File were to save them Parameters: propsToSave - The Properties which to save. |
setProperty | public Object setProperty(String name, String value)(Code) | | Set the Property.
Parameters: name - the name of the Property (the part in front of the '=' in the Property file) Parameters: value - the (new) value of the Property (the part after the '=' in the Property file) |
showContents | public void showContents()(Code) | | Dump the contents of this Property to your screen (for debugging)
|
|
|