public class ExtendedProperties
extends java.util.Properties
Constructor and Description |
---|
ExtendedProperties() |
ExtendedProperties(java.util.Properties props)
supported for interface compatibility to java.util.Properties only, default
properties are not supported.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
get(java.lang.Object key)
Internal use only, public for compatibility to Hashtable only.
|
boolean |
getBoolean(java.lang.String name,
boolean def)
Get this property value, as a boolean.
|
double |
getDouble(java.lang.String name,
double def)
Get this property value, as a double.
|
java.io.File |
getFile(java.lang.String name,
java.io.File def)
Get this property value, as a File.
|
int |
getInteger(java.lang.String name,
int def)
Get this property value, as an integer.
|
java.lang.Object[] |
getObjectArray(java.lang.String name,
java.lang.Object[] def)
Get this property as an Object array.
|
java.lang.String |
getProperty(java.lang.String key) |
java.lang.String |
getProperty(java.lang.String key,
java.lang.String def) |
java.lang.String |
getString(java.lang.String name,
java.lang.String def)
Get this property value, as a String.
|
java.lang.String[] |
getStringArray(java.lang.String name,
java.lang.String[] def)
Get this property as a String array.
|
void |
load(java.io.InputStream in)
Reads a property list from an input stream.
|
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
Maps the specified key to the specified value in this hashtable.
|
void |
save(java.io.OutputStream out,
java.lang.String header) |
void |
store(java.io.OutputStream out,
java.lang.String header) |
list, list, load, loadFromXML, propertyNames, setProperty, store, storeToXML, storeToXML, stringPropertyNames
public ExtendedProperties()
public ExtendedProperties(java.util.Properties props)
public java.lang.Object put(java.lang.Object key, java.lang.Object value)
This method allows to add serveral values for one key. In this case an array is returned.
put
in interface java.util.Map<java.lang.Object,java.lang.Object>
put
in class java.util.Hashtable<java.lang.Object,java.lang.Object>
key
- the hashtable keyvalue
- the valuepublic java.lang.Object get(java.lang.Object key)
get
in interface java.util.Map<java.lang.Object,java.lang.Object>
get
in class java.util.Hashtable<java.lang.Object,java.lang.Object>
public boolean getBoolean(java.lang.String name, boolean def)
name
- the name of the property to be fetcheddef
- the default value, if the property isn't definedpublic java.lang.String getString(java.lang.String name, java.lang.String def)
name
- the name of the property to be fetcheddef
- the default value, if the property isn't definedpublic java.lang.String[] getStringArray(java.lang.String name, java.lang.String[] def)
name
- the property's namedef
- the default value (if undefined)public java.lang.Object[] getObjectArray(java.lang.String name, java.lang.Object[] def)
name
- the property's namedef
- the default value (if undefined)public int getInteger(java.lang.String name, int def)
name
- the name of the property to be fetcheddef
- the default value, if the property isn't definedpublic double getDouble(java.lang.String name, double def)
name
- the name of the propertydef
- the default value if undefinedpublic java.lang.String getProperty(java.lang.String key, java.lang.String def)
getProperty
in class java.util.Properties
public java.lang.String getProperty(java.lang.String key)
getProperty
in class java.util.Properties
public java.io.File getFile(java.lang.String name, java.io.File def)
name
- the name of the property to be fetcheddef
- the default value, if the property isn't definedpublic void load(java.io.InputStream in) throws java.io.IOException
load
in class java.util.Properties
in
- the input streamjava.io.IOException
- if an error occurred when reading from the input streampublic void save(java.io.OutputStream out, java.lang.String header)
save
in class java.util.Properties
public void store(java.io.OutputStream out, java.lang.String header) throws java.io.IOException
store
in class java.util.Properties
java.io.IOException