public final class ConfigReader extends Object
Modifier and Type | Method and Description |
---|---|
static StandaloneConfig |
parse(InputStream in)
Will parse the passed InputStream into a
StandaloneConfig instance. |
static StandaloneConfig |
parse(String fileName)
Will parse the passed in file, which can either be a file on the file system
or a file on the classpath into a
StandaloneConfig instance. |
public static StandaloneConfig parse(String fileName) throws Exception
StandaloneConfig
instance.fileName
- the name of a file on the file system or on the classpath.StandaloneConfig
populated with the values in the JSON configuration file.Exception
- if en error occurs while parsing the filepublic static StandaloneConfig parse(InputStream in)
StandaloneConfig
instance.in
- the input stream to parse. Should be from a JSON source representing a SimplePush configuration.StandaloneConfig
populated with the values in the JSON input stream.Copyright © 2015 JBoss by Red Hat. All Rights Reserved.