ConfigurationSourceProviderpublic class ResourceConfigurationSourceProvider extends java.lang.Object implements ConfigurationSourceProvider
ConfigurationSourceProvider which reads the configuration
from a resource file.
In order to abide by the calling conventions of
{ClassLoader#getResourceAsStream} [1], absolute path strings
(i.e. those with leading "/" characters) passed to open(String)
are converted to relative paths by removing the leading "/".
See [1] for more information on resources in Java and how they are loaded at runtime.
[1] https://docs.oracle.com/javase/8/docs/technotes/guides/lang/resources.html
| Constructor | Description |
|---|---|
ResourceConfigurationSourceProvider() |
| Modifier and Type | Method | Description |
|---|---|---|
java.io.InputStream |
open(java.lang.String path) |
Returns an
InputStream that contains the source of the configuration for the
application. |
public ResourceConfigurationSourceProvider()
public java.io.InputStream open(java.lang.String path)
throws java.io.IOException
ConfigurationSourceProviderInputStream that contains the source of the configuration for the
application. The caller is responsible for closing the result.open in interface ConfigurationSourceProviderpath - the path to the configurationInputStreamjava.io.IOException - if there is an error reading the data at pathCopyright © 2018. All rights reserved.