dfischer.femtowebserver.lib
Class PropertyManager
java.lang.Object
|
+--dfischer.femtowebserver.lib.PropertyManager
- public class PropertyManager
- extends java.lang.Object
Allows to read initial values from a property input stream.
|
Constructor Summary |
PropertyManager(java.io.InputStream in)
Creates a new instance and reads the properties from an input stream. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PropertyManager
public PropertyManager(java.io.InputStream in)
throws java.io.IOException
- Creates a new instance and reads the properties from an input stream.
Programming Example for the input stream:
InputStream is = getClass().getClassLoader().getResourceAsStream(propertyFileName);
- Parameters:
in - input stream where the property data are read from
getSpecificProperties
public java.util.Properties getSpecificProperties()
- Returns all property-names and property-values
- Returns:
- all property-names and property-values
getSpecificProperty
public java.lang.String getSpecificProperty(java.lang.String key)
- Returns the string value of a property name.
- Parameters:
key - property name- Returns:
- string value of a property name or null, if the name was not found
getSpecificPropertyIntValue
public int getSpecificPropertyIntValue(java.lang.String key)
- Returns the int value of a property name.
- Parameters:
key - property name- Returns:
- int value of a property name or -1, if the name was not found, *or* -1 if it was not possible to convert the value to an int.