Femto Web Server V1.4-F

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.
 
Method Summary
 java.util.Properties getSpecificProperties()
          Returns all property-names and property-values
 java.lang.String getSpecificProperty(java.lang.String key)
          Returns the string value of a property name.
 int getSpecificPropertyIntValue(java.lang.String key)
          Returns the int value of a property name.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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);   -- or --
InputStream is = ClassLoader.getSystemClassLoader().getResourceAsStream(propertyFileName);
Parameters:
in - input stream where the property data are read from
Method Detail

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.

Femto Web Server V1.4-F

Copyright 2002, 2003, 2006 by Ingenieurbüro David Fischer GmbH, Switzerland. All rights reserved.