- 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 creatingBodyPart
instances.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ReadableBodyPart.Builder
buffered()
Mark the part content as buffered.ReadableBodyPart
build()
Build the instance from this builder.ReadableBodyPart.Builder
content(MessageBodyReadableContent content)
Sets the content for this part.ReadableBodyPart.Builder
headers(ReadableBodyPartHeaders headers)
Set the headers for this part.ReadableBodyPart.Builder
headers(Supplier<ReadableBodyPartHeaders> supplier)
Set the headers for this part.ReadableBodyPart.Builder
headers(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:Builder
Build the instance from this builder.- Specified by:
build
in interfaceBuilder<ReadableBodyPart>
- Returns:
- instance of the built type
-
-