public class AppProperties
extends java.util.Properties
| Constructor and Description |
|---|
AppProperties()
Instantiates the object
|
AppProperties(java.util.Properties defaults)
Instantiates the object populated with default values
|
AppProperties(java.lang.String fileName)
Instantiates the object and reads the properties from a given file
|
AppProperties(java.lang.String fileName,
boolean trace)
Instantiates the object and reads the properties from a given file
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getAppName() |
boolean |
getBooleanProperty(java.lang.String key,
boolean defValue)
Returns a value of the boolean property
|
java.lang.String |
getFileName()
Returns the file name that was used to load the properties
|
int |
getIntProperty(java.lang.String key,
int defValue)
Returns a value of the int property
|
void |
setAppName(java.lang.String appName) |
void |
setBooleanProperty(java.lang.String key,
boolean value)
Sets the value of a boolean property
|
void |
setIntProperty(java.lang.String key,
int value)
Sets the value of an int property
|
getProperty, getProperty, list, list, load, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNamespublic AppProperties(java.lang.String fileName)
fileName - name of the filepublic AppProperties(java.lang.String fileName,
boolean trace)
fileName - name of the filetrace - if true, a log message will be written indicating the progress of loadingpublic AppProperties(java.util.Properties defaults)
throws java.lang.Exception
defaults - Propertiesjava.lang.Exceptionpublic AppProperties()
java.lang.Exceptionpublic java.lang.String getAppName()
public void setAppName(java.lang.String appName)
public boolean getBooleanProperty(java.lang.String key,
boolean defValue)
key - property namedefValue - default value that should be used if the property has no valuepublic void setBooleanProperty(java.lang.String key,
boolean value)
key - property namevalue - valuepublic int getIntProperty(java.lang.String key,
int defValue)
key - property namedefValue - default value that should be used if the property has no valuepublic void setIntProperty(java.lang.String key,
int value)
key - property namevalue - valuepublic java.lang.String getFileName()
Copyright © 2000-2012 CreamTec LLC. All Rights Reserved.