com.ca.jcs.standalone
Class FormattedProperties
java.lang.Object
java.util.Dictionary<K,V>
java.util.Hashtable<Object,Object>
java.util.Properties
com.ca.jcs.standalone.FormattedProperties
- All Implemented Interfaces:
- Serializable, Cloneable, Map<Object,Object>
public class FormattedProperties
- extends Properties
A customised Java properties implementation that adds support for:
- sorting keys into alphabetical order
- retaining header comments in properties loaded from an existing file
- Author:
- fittr01
- See Also:
- Serialized Form
| 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, keySet, put, putAll, rehash, remove, size, toString, values |
FormattedProperties
public FormattedProperties()
- Default constructor.
FormattedProperties
public FormattedProperties(Properties props)
- Constructor taking existing properties.
- Parameters:
props - the existing properties.
keys
public Enumeration<Object> keys()
- Overrides:
keys in class Hashtable<Object,Object>
load
public void load(InputStream inStream)
throws IOException
- Load properties from the specified InputStream.
Overload the load method in Properties so we can keep any comments or blank lines in the header.
- Overrides:
load in class Properties
- Parameters:
inStream - The InputStream to read.
- Throws:
IOException
store
public void store(OutputStream out,
String comments)
throws IOException
- Overrides:
store in class Properties
- Throws:
IOException
Created 2011-07-14 13:27 EST