public class Config
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<java.lang.String,java.lang.String> |
configs |
| Constructor and Description |
|---|
Config() |
| Modifier and Type | Method and Description |
|---|---|
void |
configLogger()
Configure Logger
|
java.lang.String |
get(java.lang.String key,
java.lang.String defaultValue)
Get Config
|
java.util.Map<java.lang.String,java.lang.String> |
getAll()
Get All Configs
|
java.lang.Boolean |
loadPropertiesFile(java.lang.String path)
Load Properties File
|
void |
set(java.lang.String key,
java.lang.String value)
Set Config
|
java.lang.Boolean |
storePropertiesFile(java.lang.String path)
Store Configs in Properties File
|
public java.lang.Boolean loadPropertiesFile(java.lang.String path)
throws java.io.IOException
path - relative path to the config filejava.io.IOException - May throw IOException if it cannot open configs filepublic java.lang.Boolean storePropertiesFile(java.lang.String path)
throws java.io.IOException
path - relative path to the config filejava.io.IOException - May throw IOException if it cannot open configs filepublic void set(java.lang.String key,
java.lang.String value)
key - the config item keyvalue - the config item valuepublic java.lang.String get(java.lang.String key,
java.lang.String defaultValue)
key - the config item keydefaultValue - the config item default valuepublic java.util.Map<java.lang.String,java.lang.String> getAll()
public void configLogger()