public class ModifiedHttpMultipart
extends java.lang.Object
| Constructor and Description |
|---|
ModifiedHttpMultipart(java.lang.String subType,
java.nio.charset.Charset charset,
java.lang.String boundary)
Creates an instance with the specified settings.
|
ModifiedHttpMultipart(java.lang.String subType,
java.nio.charset.Charset charset,
java.lang.String boundary,
org.apache.http.entity.mime.HttpMultipartMode mode)
Creates an instance with the specified settings.
|
ModifiedHttpMultipart(java.lang.String subType,
java.lang.String boundary) |
| Modifier and Type | Method and Description |
|---|---|
void |
addBodyPart(org.apache.http.entity.mime.FormBodyPart part) |
java.util.List<org.apache.http.entity.mime.FormBodyPart> |
getBodyParts() |
java.lang.String |
getBoundary() |
java.nio.charset.Charset |
getCharset() |
org.apache.http.entity.mime.HttpMultipartMode |
getMode() |
java.lang.String |
getSubType() |
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).
|
void |
writeTo(java.io.OutputStream out)
Writes out the content in the multipart/form encoding.
|
public ModifiedHttpMultipart(java.lang.String subType,
java.nio.charset.Charset charset,
java.lang.String boundary,
org.apache.http.entity.mime.HttpMultipartMode mode)
subType - mime subtype - must not be nullcharset - 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 nullmode - the mode to usejava.lang.IllegalArgumentException - if charset is null or boundary is nullpublic ModifiedHttpMultipart(java.lang.String subType,
java.nio.charset.Charset charset,
java.lang.String boundary)
HttpMultipartMode.STRICTsubType - mime subtype - must not be nullcharset - 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 nulljava.lang.IllegalArgumentException - if charset is null or boundary is nullpublic ModifiedHttpMultipart(java.lang.String subType,
java.lang.String boundary)
public java.lang.String getSubType()
public java.nio.charset.Charset getCharset()
public org.apache.http.entity.mime.HttpMultipartMode getMode()
public java.util.List<org.apache.http.entity.mime.FormBodyPart> getBodyParts()
public void addBodyPart(org.apache.http.entity.mime.FormBodyPart part)
public java.lang.String getBoundary()
public void writeTo(java.io.OutputStream out)
throws java.io.IOException
java.io.IOExceptiongetMode()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.