Class HttpRFC7578Multipart
java.lang.Object
org.apache.hc.client5.http.entity.mime.AbstractMultipartFormat
org.apache.hc.client5.http.entity.mime.HttpRFC7578Multipart
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final HttpMultipartModeprivate final List<MultipartPart> Fields inherited from class AbstractMultipartFormat
boundary, charset, CR_LF, FIELD_SEP, TWO_HYPHENS -
Constructor Summary
ConstructorsConstructorDescriptionHttpRFC7578Multipart(Charset charset, String boundary, List<MultipartPart> parts, String preamble, String epilogue, HttpMultipartMode mode) Constructs a new instance ofHttpRFC7578Multipartwith the given charset, boundary, parts, preamble, and epilogue.HttpRFC7578Multipart(Charset charset, String boundary, List<MultipartPart> parts, HttpMultipartMode mode) Constructs a new instance ofHttpRFC7578Multipartwith the given charset, boundary, and parts. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidformatMultipartHeader(MultipartPart part, OutputStream out) Write the multipart header fields; depends on the style.getParts()Methods inherited from class AbstractMultipartFormat
doWriteTo, encode, escapeQuoted, getTotalLength, isLineBreak, stripLineBreaks, writeBytes, writeBytes, writeBytes, writeField, writeField, writeTo
-
Field Details
-
parts
-
mode
-
-
Constructor Details
-
HttpRFC7578Multipart
public HttpRFC7578Multipart(Charset charset, String boundary, List<MultipartPart> parts, String preamble, String epilogue, HttpMultipartMode mode) Constructs a new instance ofHttpRFC7578Multipartwith the given charset, boundary, parts, preamble, and epilogue.- Parameters:
charset- the charset to use.boundary- the boundary string to use.parts- the list of parts to include in the multipart message.preamble- the optional preamble string to include before the first part. May benull.epilogue- the optional epilogue string to include after the last part. May benull.
-
HttpRFC7578Multipart
public HttpRFC7578Multipart(Charset charset, String boundary, List<MultipartPart> parts, HttpMultipartMode mode) Constructs a new instance ofHttpRFC7578Multipartwith the given charset, boundary, and parts.- Parameters:
charset- the charset to use.boundary- the boundary string to use.parts- the list of parts to include in the multipart message.
-
-
Method Details
-
getParts
- Specified by:
getPartsin classAbstractMultipartFormat
-
formatMultipartHeader
Description copied from class:AbstractMultipartFormatWrite the multipart header fields; depends on the style.- Specified by:
formatMultipartHeaderin classAbstractMultipartFormat- Throws:
IOException
-