org.apache.pluto.portalImpl.util
Class Properties

java.lang.Object
  extended by org.apache.pluto.portalImpl.util.NameValuePairs
      extended by org.apache.pluto.portalImpl.util.Properties

public class Properties
extends NameValuePairs

This class loads name/value pairs from a properties file. The properties file is specified as input stream and follows the usual convention for Java properties files.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.pluto.portalImpl.util.NameValuePairs
NameValuePairs.Entry
 
Constructor Summary
Properties()
           
 
Method Summary
 Properties getSubSet(java.lang.String aNamePrefix)
          Returns a subset of the NameValuePairs where the names are starting with the specified prefix.
 void load(java.io.InputStream aInputStream)
          Loads name/value pairs from the given input stream.
 
Methods inherited from class org.apache.pluto.portalImpl.util.NameValuePairs
add, add, findEntry, getBoolean, getBoolean, getBoolean, getInteger, getInteger, getInteger, getString, getString, getStrings, keys, names, removeEntry, setParent, size, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Properties

public Properties()
Method Detail

load

public void load(java.io.InputStream aInputStream)
          throws java.io.IOException
Loads name/value pairs from the given input stream.

Throws:
java.io.IOException

getSubSet

public Properties getSubSet(java.lang.String aNamePrefix)
Returns a subset of the NameValuePairs where the names are starting with the specified prefix. As keys of the result set all start with the same prefix, this prfix is cut off.
E.g:
Given following set: {[A1,x], [A2,y], [A3,z], [B1,x], [B2,y]]}
getSubSet("A") returns {[1,x], [2,y], [3,z]}

Please note: the implementation of this method is slow, to be used only for initialisation tasks or alike!

Parameters:
aNamePrefix - the prefix that all returned pair names have in common.


Copyright © 2003-2010 . All Rights Reserved.