|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.dpml.util.Util
public final class Util
Utility class supporting operations related to property retrival.
| Method Summary | |
|---|---|
static String |
getProperty(Properties props,
String key,
String def)
Return the value of a property. |
static String[] |
readListFile(URL listFile)
Read a file and return the list of lines in an array of strings. |
static Properties |
readProps(URL propsUrl)
Read a set of properties from a property file specificed by a url. |
static Properties |
readProps(URL propsUrl,
boolean resolve)
Read a set of properties from a property file specificed by a url. |
static String |
resolveProperty(Properties props,
String value)
Resolve symbols in a supplied value against supplied known properties. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Properties readProps(URL propsUrl)
throws IOException
propsUrl - the url of the property file to read
IOException - if an io error occurs
public static Properties readProps(URL propsUrl,
boolean resolve)
throws IOException
propsUrl - the url of the property file to readresolve - if TRUE apply property symbol resolution
IOException - if an io error occurs
public static String resolveProperty(Properties props,
String value)
props - a set of know propertiesvalue - the string to parse for tokens
public static String getProperty(Properties props,
String key,
String def)
props - the property filekey - the property key to lookupdef - the default value
public static String[] readListFile(URL listFile)
throws IOException
listFile - the url to read from
IOException - if a read error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||