public class MultipartForm extends Object
Constructor and Description |
---|
MultipartForm(Charset charset,
String boundary,
List<org.apache.http.entity.mime.FormBodyPart> parts)
Creates an instance with the specified settings.
|
Modifier and Type | Method and Description |
---|---|
protected void |
formatMultipartHeader(org.apache.http.entity.mime.FormBodyPart part,
OutputStream out)
Write the multipart header fields; depends on the style.
|
List<org.apache.http.entity.mime.FormBodyPart> |
getBodyParts() |
long |
getTotalLength()
Determines the total length of the multipart content (content length of
individual parts plus that of extra elements required to delimit the parts
from one another).
|
boolean |
isRepeatable() |
protected static void |
writeField(org.apache.http.entity.mime.MinimalField field,
Charset charset,
OutputStream out) |
protected static void |
writeField(org.apache.http.entity.mime.MinimalField field,
OutputStream out) |
void |
writeTo(OutputStream out)
Writes out the content in the specified multipart encoding.
|
public MultipartForm(Charset charset, String boundary, List<org.apache.http.entity.mime.FormBodyPart> parts)
charset
- the character set to use. May be null
, in which case MIME.DEFAULT_CHARSET
- i.e. US-ASCII - is used.boundary
- to use - must not be null
IllegalArgumentException
- if charset is null or boundary is nullprotected static void writeField(org.apache.http.entity.mime.MinimalField field, OutputStream out) throws IOException
IOException
protected static void writeField(org.apache.http.entity.mime.MinimalField field, Charset charset, OutputStream out) throws IOException
IOException
public List<org.apache.http.entity.mime.FormBodyPart> getBodyParts()
protected void formatMultipartHeader(org.apache.http.entity.mime.FormBodyPart part, OutputStream out) throws IOException
IOException
public void writeTo(OutputStream out) throws IOException
IOException
public long getTotalLength()
This method buffers only a small amount of data in order to determine the total length of the entire entity. The content of individual parts is not buffered.
-1
otherwise.public boolean isRepeatable()
Copyright © 2023 Frank!Framework. All rights reserved.