Class BodyPartBuilder
java.lang.Object
com.linecorp.armeria.common.multipart.BodyPartBuilder
A builder class for creating
BodyPart
instances.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Returns a newly-createdBodyPart
.content
(byte[] contents) Adds the specifiedbytes
as a body part content.Adds the specifiedHttpData
as a body part content.Adds the specifiedFile
as a body part content.Adds the specifiedFile
as a body part content.content
(CharSequence content) Adds the specifiedCharSequence
as a UTF-8-encoded body part content.Adds the specifiedPath
as a body part content.Adds the specifiedPath
as a body part content.Adds a new body part backed by the specifiedPublisher
.headers
(HttpHeaders headers) Sets the specified headers for this part.
-
Method Details
-
headers
Sets the specified headers for this part.- Parameters:
headers
- headers
-
content
Adds a new body part backed by the specifiedPublisher
.- Parameters:
publisher
- publisher for the part content
-
content
Adds the specifiedCharSequence
as a UTF-8-encoded body part content. -
content
Adds the specifiedbytes
as a body part content. -
content
-
content
-
content
-
content
-
content
Adds the specifiedHttpData
as a body part content. -
build
Returns a newly-createdBodyPart
.
-