public class PropertyUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.util.Map<java.lang.String,java.util.Properties> |
CACHED_PROPERTIES
The property file.
|
Constructor and Description |
---|
PropertyUtil() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getProperty(java.lang.String propertyFile,
java.lang.String key)
Get property string.
|
static java.lang.String |
getProperty(java.lang.String propertyFile,
java.lang.String key,
java.lang.String defaultValue)
Get property string.
|
static java.util.Properties |
loadPropertyFile(java.lang.String propertyFile)
Load property file properties.
|
public static final java.util.Map<java.lang.String,java.util.Properties> CACHED_PROPERTIES
public static java.lang.String getProperty(java.lang.String propertyFile, java.lang.String key)
propertyFile
- the property file (.default properties files are also cached if they exist)key
- the keypublic static java.lang.String getProperty(java.lang.String propertyFile, java.lang.String key, java.lang.String defaultValue)
propertyFile
- the property file (.default properties files are also cached if they exist)key
- the keydefaultValue
- the default value (if not .default properties were found, then this is returned)public static java.util.Properties loadPropertyFile(java.lang.String propertyFile)
propertyFile
- the property file name (.default properties files are also searched)