Module io.helidon.media.multipart
Package io.helidon.media.multipart
Class WriteableMultiPart.Builder
java.lang.Object
io.helidon.media.multipart.WriteableMultiPart.Builder
- All Implemented Interfaces:
Builder<WriteableMultiPart.Builder,,WriteableMultiPart> Supplier<WriteableMultiPart>
- Enclosing class:
- WriteableMultiPart
public static final class WriteableMultiPart.Builder
extends Object
implements Builder<WriteableMultiPart.Builder,WriteableMultiPart>
Builder class for creating
WriteableMultiPart instances.-
Method Summary
Modifier and TypeMethodDescriptionbodyPart(WriteableBodyPart bodyPart) Add a body part.Add a new body part based on the name entity.Add a new body part based on the name, filename andPathto the file.Add a new body part based on the name andPathto the files.bodyPart(Supplier<WriteableBodyPart> supplier) Add a body part.bodyParts(Collection<WriteableBodyPart> bodyParts) Add body parts.build()Build the instance from this builder.
-
Method Details
-
bodyPart
Add a body part.- Parameters:
bodyPart- body part to add- Returns:
- this builder instance
-
bodyPart
Add a body part.- Parameters:
supplier- supplier of body part to add- Returns:
- this builder instance
-
bodyPart
Add a new body part based on the name entity.- Parameters:
name- body part nameentity- body part entity- Returns:
- this builder instance
-
bodyPart
Add a new body part based on the name, filename andPathto the file.- Parameters:
name- body part namefilename- body part filenamefile- file path- Returns:
- this builder instance
-
bodyPart
Add a new body part based on the name andPathto the files.
Filename for each file is set as actual file name.- Parameters:
name- body part namefiles- file path- Returns:
- this builder instance
-
bodyParts
Add body parts.- Parameters:
bodyParts- body parts to add- Returns:
- this builder instance
-
build
Description copied from interface:BuilderBuild the instance from this builder.- Specified by:
buildin interfaceBuilder<WriteableMultiPart.Builder,WriteableMultiPart> - Returns:
- instance of the built type
-