S - a type of data stamppublic static interface ConfigParser.Content<S>
| Modifier and Type | Method and Description |
|---|---|
<T extends Readable & AutoCloseable> |
asReadable()
Returns a
Readable that is use to read configuration content from. |
default void |
close() |
static <S> ConfigParser.Content<S> |
create(Readable readable,
String mediaType,
Optional<S> stamp)
Creates
ConfigParser.Content from given readable content and
with specified mediaType of configuration format. |
String |
mediaType()
Returns configuration content media type.
|
default Optional<S> |
stamp()
A modification stamp of the content.
|
default void close()
throws ConfigException
ConfigExceptiondefault Optional<S> stamp()
Default implementation returns Instant.EPOCH.
String mediaType()
<T extends Readable & AutoCloseable> T asReadable()
Readable that is use to read configuration content from.T - return type that is Readable as well as AutoCloseableReadablestatic <S> ConfigParser.Content<S> create(Readable readable, String mediaType, 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–2019 Oracle and/or its affiliates. All rights reserved. Use is subject to license terms.