|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.Dictionary | +--java.util.Hashtable | +--java.util.Properties | +--iaik.utils.ExtendedProperties
An enhanced property class. This class extends the basic properties class of Java, by providing type conversion and support for multiple values per key. Note that in difference to the JDK Properties class property names are case insensitive!
Inner classes inherited from class java.util.Map |
Map.Entry |
Fields inherited from class java.util.Properties |
defaults |
Constructor Summary | |
ExtendedProperties()
|
|
ExtendedProperties(Properties props)
supported for interface compatibility to java.util.Properties only, default properties are not supported. |
Method Summary | |
Object |
get(Object key)
Internal use only, public for compatibility to Hashtable only. |
boolean |
getBoolean(String name,
boolean def)
Get this property value, as a boolean. |
double |
getDouble(String name,
double def)
Get this property value, as a double. |
File |
getFile(String name,
File def)
Get this property value, as a File. |
int |
getInteger(String name,
int def)
Get this property value, as an integer. |
Object[] |
getObjectArray(String name,
Object[] def)
Get this property as an Object array. |
String |
getProperty(String key)
|
String |
getProperty(String key,
String def)
|
String |
getString(String name,
String def)
Get this property value, as a String. |
String[] |
getStringArray(String name,
String[] def)
Get this property as a String array. |
void |
load(InputStream in)
Reads a property list from an input stream. |
Object |
put(Object key,
Object value)
Maps the specified key to the specified value in this hashtable. |
void |
save(OutputStream out,
String header)
|
void |
store(OutputStream out,
String header)
|
Methods inherited from class java.util.Properties |
list, list, propertyNames, setProperty |
Methods inherited from class java.util.Hashtable |
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, hashCode, isEmpty, keys, keySet, putAll, rehash, remove, size, toString, values |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ExtendedProperties()
public ExtendedProperties(Properties props)
Method Detail |
public Object put(Object key, Object value)
This method allows to add serveral values for one key. In this case an array is returned.
put
in class Hashtable
key
- the hashtable keyvalue
- the valuepublic Object get(Object key)
get
in class Hashtable
public boolean getBoolean(String name, boolean def)
name
- the name of the property to be fetcheddef
- the default value, if the property isn't definedpublic String getString(String name, String def)
name
- the name of the property to be fetcheddef
- the default value, if the property isn't definedpublic String[] getStringArray(String name, String[] def)
name
- the property's namedef
- the default value (if undefined)public Object[] getObjectArray(String name, Object[] def)
name
- the property's namedef
- the default value (if undefined)public int getInteger(String name, int def)
name
- the name of the property to be fetcheddef
- the default value, if the property isn't definedpublic double getDouble(String name, double def)
name
- the name of the propertydef
- the default value if undefinedpublic String getProperty(String key, String def)
getProperty
in class Properties
public String getProperty(String key)
getProperty
in class Properties
public File getFile(String name, File def)
name
- the name of the property to be fetcheddef
- the default value, if the property isn't definedpublic void load(InputStream in) throws IOException
load
in class Properties
in
- the input streamIOException
- if an error occurred when reading from the input streampublic void save(OutputStream out, String header)
save
in class Properties
public void store(OutputStream out, String header) throws IOException
store
in class Properties
|
This Javadoc may contain text parts from Internet Standard specifications (RFC 2459, 3280, 3039, 2560, 1521, 821, 822, 2253, 1319, 1321, ,2630, 2631, 2268, 3058, 2984, 2104, 2144, 2040, 2311, 2279, see copyright note) and RSA Data Security Public-Key Cryptography Standards (PKCS#1,3,5,7,8,9,10,12, see copyright note). | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |