csheets.io
Class NamedProperties
java.lang.Object
java.util.Dictionary<K,V>
java.util.Hashtable<Object,Object>
java.util.Properties
csheets.io.NamedProperties
- All Implemented Interfaces:
- Serializable, Cloneable, Map<Object,Object>
public class NamedProperties
- extends Properties
An extension of properties, predetermined to be saved in a specified file.
If the file exists, any properties therein are loaded.
- Author:
- Einar Pehrson
- See Also:
- Serialized Form
|
Method Summary |
void |
store(String comment)
Invokes store() using the file that belongs to the properties. |
void |
storeToXML(String comment)
Invokes storeToXML() using the file that belongs to the properties. |
| Methods inherited from class java.util.Properties |
getProperty, getProperty, list, list, load, loadFromXML, propertyNames, save, setProperty, store, storeToXML, storeToXML |
| 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 |
NamedProperties
public NamedProperties(File file)
throws IOException
- Creates the named properties.
- Parameters:
file - the file in which the properties are and should be stored
- Throws:
IOException - if the file could not be read from
NamedProperties
public NamedProperties(File file,
Properties defaults)
- Creates the named properties.
- Parameters:
defaults - the properties to use as defaultsfile - the file in which the properties are and should be stored
- Throws:
IOException - if the file could not be read from
store
public void store(String comment)
throws IOException
- Invokes store() using the file that belongs to the properties.
- Parameters:
comment - a description of the property list, or null if no comment is desired.
- Throws:
IOException - if the file could not be written to
storeToXML
public void storeToXML(String comment)
throws IOException
- Invokes storeToXML() using the file that belongs to the properties.
- Parameters:
comment - a description of the property list, or null if no comment is desired.
- Throws:
IOException - if the file could not be written to