|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.dtolabs.utils.PropertiesUtil
public class PropertiesUtil
PropertiesUtil provides some utility methods for Properties.
Nested Class Summary | |
---|---|
static interface |
PropertiesUtil.Adder
Adder represents an object that can have properties added to it. |
static class |
PropertiesUtil.PrefixAdder
A Adder that adds new properties to the input Properties object using a given prefix to prepend to the name of all new properties. |
static class |
PropertiesUtil.PrefixProducer
A Producer that given an input set of properties and a specific prefix, produces another set of properties from all input properties that have that prefix and removes the prefix. |
static interface |
PropertiesUtil.Producer
Reader represents an object that can produce Properties. |
Constructor Summary | |
---|---|
PropertiesUtil()
|
Method Summary | |
---|---|
static java.util.Collection |
listPropertiesWithPrefix(java.util.Properties props,
java.lang.String prefix)
Returns a Collection of all property values that have keys with a certain prefix. |
static java.util.Properties |
propertiesFromString(java.lang.String propString)
Convert a String into a Properties object |
static java.lang.String |
stringFromProperties(java.util.Properties props)
Returns the Properties formatted as a String |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PropertiesUtil()
Method Detail |
---|
public static java.lang.String stringFromProperties(java.util.Properties props) throws java.io.IOException
props
-
java.io.IOException
public static java.util.Properties propertiesFromString(java.lang.String propString) throws java.io.IOException
propString
-
java.io.IOException
public static java.util.Collection listPropertiesWithPrefix(java.util.Properties props, java.lang.String prefix)
props
- the Properties to reaqdprefix
- the prefix
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |