Package io.helidon.http.media.multipart
Class WriteablePart.Builder
java.lang.Object
io.helidon.http.media.multipart.WriteablePart.Builder
- All Implemented Interfaces:
Builder<WriteablePart.Builder,
,WriteablePart> Supplier<WriteablePart>
- Enclosing interface:
WriteablePart
public static class WriteablePart.Builder
extends Object
implements Builder<WriteablePart.Builder,WriteablePart>
Fluent API builder for
WriteablePart
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build the instance from this builder.Configure content to be serialized usingMediaContext
.Configure content to be serialized usingMediaContext
.contentType
(MediaType mediaType) Content type of this part.contentType
(HttpMediaType mediaType) Content type of this part, with possible parameters.Configure file name to be added to content disposition (formultipart/form-data
).inputStream
(Supplier<InputStream> streamSupplier) Configure content from an input stream.
-
Method Details
-
build
Description copied from interface:Builder
Build the instance from this builder.- Specified by:
build
in interfaceBuilder<WriteablePart.Builder,
WriteablePart> - Returns:
- instance of the built type
-
fileName
Configure file name to be added to content disposition (formultipart/form-data
).- Parameters:
fileName
- file name- Returns:
- updated builder
-
contentType
Content type of this part, with possible parameters.- Parameters:
mediaType
- media type to use- Returns:
- updated builder
-
contentType
Content type of this part.- Parameters:
mediaType
- media type to use- Returns:
- updated builder
-
content
Configure content to be serialized usingMediaContext
.- Parameters:
content
- content to use- Returns:
- updated builder
-
content
Configure content to be serialized usingMediaContext
.- Parameters:
contentSupplier
- content supplier to use, will be called when serializing the message- Returns:
- updated builder
-
inputStream
Configure content from an input stream. The input stream will be obtained when serializing this part.- Parameters:
streamSupplier
- supplier of an input stream- Returns:
- updated builder
-