S
- a type of data stamppublic static interface ConfigParser.Content<S>
Modifier and Type | Method | Description |
---|---|---|
<T extends java.lang.Readable & java.lang.AutoCloseable> |
asReadable() |
Returns a
Readable that is use to read configuration content from. |
default void |
close() |
|
static <S> ConfigParser.Content<S> |
from(java.lang.Readable readable,
java.lang.String mediaType,
java.util.Optional<S> stamp) |
Creates
ConfigParser.Content from given readable content and
with specified mediaType of configuration format. |
java.lang.String |
getMediaType() |
Returns configuration content media type.
|
default java.util.Optional<S> |
getStamp() |
A modification stamp of the content.
|
default void close() throws ConfigException
ConfigException
default java.util.Optional<S> getStamp()
Default implementation returns Instant.EPOCH
.
java.lang.String getMediaType()
<T extends java.lang.Readable & java.lang.AutoCloseable> T asReadable()
Readable
that is use to read configuration content from.T
- return type that is Readable
as well as AutoCloseable
Readable
static <S> ConfigParser.Content<S> from(java.lang.Readable readable, java.lang.String mediaType, java.util.Optional<S> stamp)
ConfigParser.Content
from given readable content
and
with specified mediaType
of configuration format.S
- a type of data stampreadable
- a readable providing configuration.
If it implements AutoCloseable
it is automatically closed whenever parsed.mediaType
- a configuration mediaTypestamp
- content stampCopyright © 2018 Oracle Corporation. All rights reserved.