public class JsonConfig
extends java.lang.Object
| Constructor and Description |
|---|
JsonConfig() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getProperty(java.lang.String path)
Get a value
|
java.lang.String |
getProperty(java.lang.String path,
java.lang.String defaultValue)
Get a value
|
boolean |
isEmpty() |
void |
load(java.io.InputStream is)
Loads settings from stream
|
void |
load(java.io.Reader ir)
Loads settings from reader
|
void |
save(java.io.OutputStream os)
Save settings to stream
|
void |
save(java.io.Writer ow)
Save settings to Writer
|
void |
setProperty(java.lang.String path,
java.lang.String value)
Stores a value to a name.
|
public JsonConfig()
JsonConfigpublic void load(java.io.InputStream is)
throws java.io.IOException
is - - InputStreamjava.io.IOExceptionpublic void load(java.io.Reader ir)
throws java.io.IOException
ir - - Readerjava.io.IOExceptionpublic void save(java.io.OutputStream os)
throws java.io.IOException
os - - OutputStreamjava.io.IOExceptionpublic void save(java.io.Writer ow)
throws java.io.IOException
ow - - Writerjava.io.IOExceptionpublic void setProperty(java.lang.String path,
java.lang.String value)
path - - path of the valuevalue - the valuepublic java.lang.String getProperty(java.lang.String path)
path - - to the valuepublic java.lang.String getProperty(java.lang.String path,
java.lang.String defaultValue)
path - - to the valuedefaultValue - - defaultValue if the path doesn't existspublic boolean isEmpty()
Boolean.TRUE if there are no entries