- java.lang.Object
-
- io.helidon.config.spi.ConfigContent.Builder<ConfigParser.Content.Builder>
-
- io.helidon.config.spi.ConfigParser.Content.Builder
-
- All Implemented Interfaces:
Builder<ConfigParser.Content>,Supplier<ConfigParser.Content>
- Enclosing interface:
- ConfigParser.Content
public static class ConfigParser.Content.Builder extends ConfigContent.Builder<ConfigParser.Content.Builder> implements Builder<ConfigParser.Content>
Fluent API builder forConfigParser.Content.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConfigParser.Contentbuild()Build the instance from this builder.ConfigParser.Content.Buildercharset(Charset charset)Configure charset if known by the config source.ConfigParser.Content.Builderdata(InputStream data)Data of the config source as loaded from underlying storage.ConfigParser.Content.BuildermediaType(String mediaType)Media type of the content if known by the config source.ConfigParser.Content.BuildermediaType(Optional<String> mediaType)A shortcut method to invoke with result ofMediaTypes.detectType(String)and similar methods.-
Methods inherited from class io.helidon.config.spi.ConfigContent.Builder
stamp
-
-
-
-
Method Detail
-
data
public ConfigParser.Content.Builder data(InputStream data)
Data of the config source as loaded from underlying storage.- Parameters:
data- to be parsed- Returns:
- updated builder instance
-
mediaType
public ConfigParser.Content.Builder mediaType(String mediaType)
Media type of the content if known by the config source. Media type is configured on content, as sometimes you need the actual file to exist to be able to "guess" its media type, and this is the place we are sure it exists.- Parameters:
mediaType- media type of the content as understood by the config source- Returns:
- updated builder instance
-
mediaType
public ConfigParser.Content.Builder mediaType(Optional<String> mediaType)
A shortcut method to invoke with result ofMediaTypes.detectType(String)and similar methods. Only sets media type if the parameter is present.- Parameters:
mediaType- optional of media type- Returns:
- updated builder instance
-
charset
public ConfigParser.Content.Builder charset(Charset charset)
Configure charset if known by the config source.- Parameters:
charset- charset to use if the content should be read using a reader- Returns:
- updated builder instance
-
build
public ConfigParser.Content build()
Description copied from interface:BuilderBuild the instance from this builder.- Specified by:
buildin interfaceBuilder<ConfigParser.Content>- Returns:
- instance of the built type
-
-