-
- All Superinterfaces:
ConfigContent
- Enclosing interface:
- ConfigParser
public static interface ConfigParser.Content extends ConfigContent
Config content to be parsed by aConfigParser
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ConfigParser.Content.Builder
Fluent API builder forConfigParser.Content
.-
Nested classes/interfaces inherited from interface io.helidon.config.spi.ConfigContent
ConfigContent.NodeContent, ConfigContent.OverrideContent
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static ConfigParser.Content.Builder
builder()
A fluent API builder forConfigParser.Content
.Charset
charset()
Charset configured by the config source orUTF-8
if none configured.static ConfigParser.Content
create(InputStream data, String mediaType, Object stamp)
Create content from data, media type and a stamp.InputStream
data()
Data of this config source.Optional<String>
mediaType()
Media type of the content.-
Methods inherited from interface io.helidon.config.spi.ConfigContent
close, stamp
-
-
-
-
Method Detail
-
mediaType
Optional<String> mediaType()
Media type of the content. This method is only called if there is no parser configured.- Returns:
- content media type if known,
empty
otherwise
-
data
InputStream data()
Data of this config source.- Returns:
- the data of the underlying source to be parsed by a
ConfigParser
-
charset
Charset charset()
Charset configured by the config source orUTF-8
if none configured.- Returns:
- charset to use when reading
data()
if needed by the parser
-
builder
static ConfigParser.Content.Builder builder()
A fluent API builder forConfigParser.Content
.- Returns:
- a new builder instance
-
create
static ConfigParser.Content create(InputStream data, String mediaType, Object stamp)
Create content from data, media type and a stamp. If not all are available, construct content usingbuilder()
- Parameters:
data
- input stream to underlying datamediaType
- content media typestamp
- stamp of the content- Returns:
- content built from provided information
-
-