public class PropertiesUtil
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
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 and Description |
|---|
PropertiesUtil() |
| Modifier and Type | Method and Description |
|---|---|
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
|
public static java.lang.String stringFromProperties(java.util.Properties props)
throws java.io.IOException
props - propertiesjava.io.IOException - if an error occurspublic static java.util.Properties propertiesFromString(java.lang.String propString)
throws java.io.IOException
propString - properties stringjava.io.IOException - if an error occurspublic static java.util.Collection listPropertiesWithPrefix(java.util.Properties props,
java.lang.String prefix)
props - the Properties to reaqdprefix - the prefix