@FunctionalInterface public interface ConfigurationLoader
Supported resource types:
| Modifier and Type | Interface and Description |
|---|---|
static interface |
ConfigurationLoader.Defaults |
static class |
ConfigurationLoader.FileLoader |
static class |
ConfigurationLoader.InputStreamLoader |
static class |
ConfigurationLoader.PathLoader |
static class |
ConfigurationLoader.UrlLoader |
| Modifier and Type | Method and Description |
|---|---|
String |
loadConfiguration()
Loads the configuration from the given resource.
|
static ConfigurationLoader |
New(File file)
Tries to load the configuration from
file. |
static ConfigurationLoader |
New(File file,
Charset charset)
Tries to load the configuration from
file. |
static ConfigurationLoader |
New(InputStream inputStream)
Tries to load the configuration from the
InputStream inputStream. |
static ConfigurationLoader |
New(InputStream inputStream,
Charset charset)
Tries to load the configuration from the
InputStream inputStream. |
static ConfigurationLoader |
New(Path path)
Tries to load the configuration from
path. |
static ConfigurationLoader |
New(Path path,
Charset charset)
Tries to load the configuration from
path. |
static ConfigurationLoader |
New(String path)
Loads the configuration from the given resource.
|
static ConfigurationLoader |
New(String path,
Charset charset)
Loads the configuration from the given resource.
|
static ConfigurationLoader |
New(URL url)
Tries to load the configuration from the URL
url. |
static ConfigurationLoader |
New(URL url,
Charset charset)
Tries to load the configuration from the URL
url. |
String loadConfiguration()
ConfigurationException - if an error occurs while loading the resourcestatic ConfigurationLoader New(String path)
The load order is as follows:
path - a classpath resource, a file path or an URLConfigurationExceptionNoConfigurationFound - if no configuration can be found at the given pathstatic ConfigurationLoader New(String path, Charset charset)
The load order is as follows:
path - a classpath resource, a file path or an URLcharset - the charset used to load the configurationConfigurationExceptionNoConfigurationFound - if no configuration can be found at the given pathstatic ConfigurationLoader New(Path path)
path.path - file system pathConfigurationException - if the configuration couldn't be loadedstatic ConfigurationLoader New(Path path, Charset charset)
path.path - file system pathcharset - the charset used to load the configurationConfigurationException - if the configuration couldn't be loadedstatic ConfigurationLoader New(File file)
file.file - file pathConfigurationException - if the configuration couldn't be loadedstatic ConfigurationLoader New(File file, Charset charset)
file.file - file pathcharset - the charset used to load the configurationConfigurationException - if the configuration couldn't be loadedstatic ConfigurationLoader New(URL url)
url.url - URL pathConfigurationException - if the configuration couldn't be loadedstatic ConfigurationLoader New(URL url, Charset charset)
url.url - URL pathcharset - the charset used to load the configurationConfigurationException - if the configuration couldn't be loadedstatic ConfigurationLoader New(InputStream inputStream)
InputStream inputStream.inputStream - the stream to read fromConfigurationException - if the configuration couldn't be loadedstatic ConfigurationLoader New(InputStream inputStream, Charset charset)
InputStream inputStream.inputStream - the stream to read fromcharset - the charset used to load the configurationConfigurationException - if the configuration couldn't be loadedCopyright © 2022 MicroStream Software. All rights reserved.