Class HttpRFC6532Multipart
- java.lang.Object
-
- org.apache.hc.client5.http.entity.mime.AbstractMultipartFormat
-
- org.apache.hc.client5.http.entity.mime.HttpRFC6532Multipart
-
class HttpRFC6532Multipart extends AbstractMultipartFormat
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<MultipartPart>
parts
-
Fields inherited from class org.apache.hc.client5.http.entity.mime.AbstractMultipartFormat
boundary, charset, CR_LF, FIELD_SEP, TWO_HYPHENS
-
-
Constructor Summary
Constructors Constructor Description HttpRFC6532Multipart(java.nio.charset.Charset charset, java.lang.String boundary, java.util.List<MultipartPart> parts)
Constructs a new instance ofHttpRFC6532Multipart
with the given charset, boundary, and parts.HttpRFC6532Multipart(java.nio.charset.Charset charset, java.lang.String boundary, java.util.List<MultipartPart> parts, java.lang.String preamble, java.lang.String epilogue)
Constructs a new instance ofHttpRFC6532Multipart
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
formatMultipartHeader(MultipartPart part, java.io.OutputStream out)
Write the multipart header fields; depends on the style.java.util.List<MultipartPart>
getParts()
-
Methods inherited from class org.apache.hc.client5.http.entity.mime.AbstractMultipartFormat
doWriteTo, encode, getTotalLength, isLineBreak, stripLineBreaks, writeBytes, writeBytes, writeBytes, writeField, writeField, writeTo
-
-
-
-
Field Detail
-
parts
private final java.util.List<MultipartPart> parts
-
-
Constructor Detail
-
HttpRFC6532Multipart
public HttpRFC6532Multipart(java.nio.charset.Charset charset, java.lang.String boundary, java.util.List<MultipartPart> parts, java.lang.String preamble, java.lang.String epilogue)
Constructs a new instance ofHttpRFC6532Multipart
.- Parameters:
charset
- The charset to use for the message.boundary
- The boundary string to use for the message.parts
- The list of parts that make up the message.preamble
- The preamble to include at the beginning of the message, ornull
if none.epilogue
- The epilogue to include at the end of the message, ornull
if none.
-
HttpRFC6532Multipart
public HttpRFC6532Multipart(java.nio.charset.Charset charset, java.lang.String boundary, java.util.List<MultipartPart> parts)
Constructs a new instance ofHttpRFC6532Multipart
with 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 Detail
-
getParts
public java.util.List<MultipartPart> getParts()
- Specified by:
getParts
in classAbstractMultipartFormat
-
formatMultipartHeader
protected void formatMultipartHeader(MultipartPart part, java.io.OutputStream out) throws java.io.IOException
Description copied from class:AbstractMultipartFormat
Write the multipart header fields; depends on the style.- Specified by:
formatMultipartHeader
in classAbstractMultipartFormat
- Throws:
java.io.IOException
-
-