public class ConfigurationReader
extends java.lang.Object
| Constructor and Description |
|---|
ConfigurationReader() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
readBooleanProperty(java.lang.String item,
java.util.Properties properties,
boolean defaultValue)
Returns the value of the named boolean configuration item by obtaining
it from either the operating system environment, the supplied properties
object or the supplied default.
|
static java.util.logging.Level |
readDebugLevelProperty(java.lang.String item,
java.util.Properties properties,
java.util.logging.Level defaultValue)
Returns the value of the named logging level configuration item by obtaining
it from either the operating system environment, the supplied properties
object or the supplied default.
|
static float |
readFloatProperty(java.lang.String item,
java.util.Properties properties,
float defaultValue)
Returns the value of the named floating-point configuration item by obtaining
it from either the operating system environment, the supplied properties
object or the supplied default.
|
static int |
readIntegerProperty(java.lang.String item,
java.util.Properties properties,
int defaultValue)
Returns the value of the named integer configuration item by obtaining
it from either the operating system environment, the supplied properties
object or the supplied default.
|
static java.lang.String |
readStringProperty(java.lang.String item,
java.util.Properties properties,
java.lang.String defaultValue)
Returns the value of the named string configuration item by obtaining
it from either the operating system environment, the supplied properties
object or the supplied default.
|
public static java.lang.String readStringProperty(java.lang.String item,
java.util.Properties properties,
java.lang.String defaultValue)
item - the name of the configuration item to read.properties - an object whose configuration entries may override
the values specified by OS environmental variables.defaultValue - the value to return when neither the OS environment
nor the properties object provide value resolution.java.lang.NullPointerException - if any of the arguments were null.public static boolean readBooleanProperty(java.lang.String item,
java.util.Properties properties,
boolean defaultValue)
item - the name of the configuration item to read.properties - an object whose configuration entries may override
the values specified by OS environmental variables.defaultValue - the value to return when neither the OS environment
nor the properties object provide value resolution.java.lang.NullPointerException - if any of the arguments were null.public static float readFloatProperty(java.lang.String item,
java.util.Properties properties,
float defaultValue)
item - the name of the configuration item to read.properties - an object whose configuration entries may override
the values specified by OS environmental variables.defaultValue - the value to return when neither the OS environment
nor the properties object provide value resolution.java.lang.NullPointerException - if any of the arguments were null.public static int readIntegerProperty(java.lang.String item,
java.util.Properties properties,
int defaultValue)
item - the name of the configuration item to read.properties - an object whose configuration entries may override
the values specified by OS environmental variables.defaultValue - the value to return when neither the OS environment
nor the properties object provide value resolution.java.lang.NullPointerException - if any of the arguments were null.public static java.util.logging.Level readDebugLevelProperty(java.lang.String item,
java.util.Properties properties,
java.util.logging.Level defaultValue)
item - the name of the configuration item to read.properties - an object whose configuration entries may override
the values specified by OS environmental variables.defaultValue - the value to return when neither the OS environment
nor the properties object provide value resolution.java.lang.NullPointerException - if any of the arguments were null.