Module io.helidon.media.multipart
Package io.helidon.media.multipart
Class WriteableBodyPartHeaders.Builder
- java.lang.Object
-
- io.helidon.media.multipart.WriteableBodyPartHeaders.Builder
-
- All Implemented Interfaces:
Builder<WriteableBodyPartHeaders>
,Supplier<WriteableBodyPartHeaders>
- Enclosing class:
- WriteableBodyPartHeaders
public static final class WriteableBodyPartHeaders.Builder extends Object implements Builder<WriteableBodyPartHeaders>
Builder class to createWriteableBodyPartHeaders
instances.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WriteableBodyPartHeaders
build()
Build the instance from this builder.WriteableBodyPartHeaders.Builder
contentDisposition(ContentDisposition contentDisp)
Add aContent-Disposition
header.WriteableBodyPartHeaders.Builder
contentType(MediaType contentType)
Add aContent-Type
header.WriteableBodyPartHeaders.Builder
filename(String fileName)
Filename which will be used inContentDisposition
.WriteableBodyPartHeaders.Builder
header(String name, String value)
Add a new header.WriteableBodyPartHeaders.Builder
header(String name, List<String> values)
Add a new header.WriteableBodyPartHeaders.Builder
headers(Map<String,List<String>> headers)
Add new headers.WriteableBodyPartHeaders.Builder
name(String name)
Name which will be used inContentDisposition
.
-
-
-
Method Detail
-
header
public WriteableBodyPartHeaders.Builder header(String name, String value)
Add a new header.- Parameters:
name
- header namevalue
- header value- Returns:
- this builder
-
header
public WriteableBodyPartHeaders.Builder header(String name, List<String> values)
Add a new header.- Parameters:
name
- header namevalues
- header values- Returns:
- this builder
-
headers
public WriteableBodyPartHeaders.Builder headers(Map<String,List<String>> headers)
Add new headers.- Parameters:
headers
- headers map- Returns:
- this builder
-
contentType
public WriteableBodyPartHeaders.Builder contentType(MediaType contentType)
Add aContent-Type
header.- Parameters:
contentType
- value for theContent-Type
header- Returns:
- this builder
-
contentDisposition
public WriteableBodyPartHeaders.Builder contentDisposition(ContentDisposition contentDisp)
Add aContent-Disposition
header.- Parameters:
contentDisp
- content disposition- Returns:
- this builder
-
name
public WriteableBodyPartHeaders.Builder name(String name)
Name which will be used inContentDisposition
. This value will be ignored if an actual instance ofContentDisposition
is set.- Parameters:
name
- content disposition name parameter- Returns:
- this builder
-
filename
public WriteableBodyPartHeaders.Builder filename(String fileName)
Filename which will be used inContentDisposition
. This value will be ignored if an actual instance ofContentDisposition
is set.- Parameters:
fileName
- content disposition filename parameter- Returns:
- this builder
-
build
public WriteableBodyPartHeaders build()
Description copied from interface:Builder
Build the instance from this builder.- Specified by:
build
in interfaceBuilder<WriteableBodyPartHeaders>
- Returns:
- instance of the built type
-
-