- java.lang.Object
-
- io.helidon.media.multipart.ReadableBodyPart.Builder
-
- All Implemented Interfaces:
Builder<ReadableBodyPart>,Supplier<ReadableBodyPart>
- Enclosing class:
- ReadableBodyPart
public static final class ReadableBodyPart.Builder extends Object implements Builder<ReadableBodyPart>
Builder class for creatingBodyPartinstances.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ReadableBodyPart.Builderbuffered()Mark the part content as buffered.ReadableBodyPartbuild()Build the instance from this builder.ReadableBodyPart.Buildercontent(MessageBodyReadableContent content)Sets the content for this part.ReadableBodyPart.Builderheaders(ReadableBodyPartHeaders headers)Set the headers for this part.ReadableBodyPart.Builderheaders(Supplier<ReadableBodyPartHeaders> supplier)Set the headers for this part.ReadableBodyPart.Builderheaders(Map<String,List<String>> headers)Set the headers for this part.
-
-
-
Method Detail
-
content
public ReadableBodyPart.Builder content(MessageBodyReadableContent content)
Sets the content for this part.- Parameters:
content- readable content- Returns:
- this builder instance
-
buffered
public ReadableBodyPart.Builder buffered()
Mark the part content as buffered.- Returns:
- this builder instance
-
headers
public ReadableBodyPart.Builder headers(ReadableBodyPartHeaders headers)
Set the headers for this part.- Parameters:
headers- headers- Returns:
- this builder instance
-
headers
public ReadableBodyPart.Builder headers(Supplier<ReadableBodyPartHeaders> supplier)
Set the headers for this part.- Parameters:
supplier- headers supplier- Returns:
- this builder instance
-
headers
public ReadableBodyPart.Builder headers(Map<String,List<String>> headers)
Set the headers for this part.- Parameters:
headers- headers map- Returns:
- this builder instance
-
build
public ReadableBodyPart build()
Description copied from interface:BuilderBuild the instance from this builder.- Specified by:
buildin interfaceBuilder<ReadableBodyPart>- Returns:
- instance of the built type
-
-