public final class ConfigurationMetadataRepositoryJsonBuilder extends Object
ConfigurationMetadataRepository
from the content of arbitrary
resource(s).Modifier and Type | Method and Description |
---|---|
ConfigurationMetadataRepository |
build()
Build a
ConfigurationMetadataRepository with the current state of this
builder. |
static ConfigurationMetadataRepositoryJsonBuilder |
create()
Create a new builder instance using
StandardCharsets.UTF_8 as the default
charset. |
static ConfigurationMetadataRepositoryJsonBuilder |
create(Charset defaultCharset)
Create a new builder instance using the specified default
Charset . |
static ConfigurationMetadataRepositoryJsonBuilder |
create(InputStream... inputStreams)
Create a new builder instance using
StandardCharsets.UTF_8 as the default
charset and the specified json resource. |
ConfigurationMetadataRepositoryJsonBuilder |
withJsonResource(InputStream inputStream)
Add the content of a
ConfigurationMetadataRepository defined by the
specified InputStream json document using the default charset. |
ConfigurationMetadataRepositoryJsonBuilder |
withJsonResource(InputStream inputStream,
Charset charset)
Add the content of a
ConfigurationMetadataRepository defined by the
specified InputStream json document using the specified Charset . |
public ConfigurationMetadataRepositoryJsonBuilder withJsonResource(InputStream inputStream) throws IOException
ConfigurationMetadataRepository
defined by the
specified InputStream
json document using the default charset. If this
metadata repository holds items that were loaded previously, these are ignored.
Leaves the stream open when done.
inputStream
- the source input streamIOException
- in case of I/O errorspublic ConfigurationMetadataRepositoryJsonBuilder withJsonResource(InputStream inputStream, Charset charset) throws IOException
ConfigurationMetadataRepository
defined by the
specified InputStream
json document using the specified Charset
. If
this metadata repository holds items that were loaded previously, these are
ignored.
Leaves the stream open when done.
inputStream
- the source input streamcharset
- the charset of the inputIOException
- in case of I/O errorspublic ConfigurationMetadataRepository build()
ConfigurationMetadataRepository
with the current state of this
builder.public static ConfigurationMetadataRepositoryJsonBuilder create(InputStream... inputStreams) throws IOException
StandardCharsets.UTF_8
as the default
charset and the specified json resource.inputStreams
- the source input streamsConfigurationMetadataRepositoryJsonBuilder
instance.IOException
- on errorpublic static ConfigurationMetadataRepositoryJsonBuilder create()
StandardCharsets.UTF_8
as the default
charset.ConfigurationMetadataRepositoryJsonBuilder
instance.public static ConfigurationMetadataRepositoryJsonBuilder create(Charset defaultCharset)
Charset
.defaultCharset
- the default charset to useConfigurationMetadataRepositoryJsonBuilder
instance.