|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.http.entity.mime.HttpMultipart
public class HttpMultipart
HttpMultipart represents a collection of MIME multipart encoded content bodies. This class is capable of operating either in the strict (RFC 822, RFC 2045, RFC 2046 compliant) or the browser compatible modes.
Constructor Summary | |
---|---|
HttpMultipart(String subType,
Charset charset,
String boundary)
Creates an instance with the specified settings. |
|
HttpMultipart(String subType,
Charset charset,
String boundary,
HttpMultipartMode mode)
Creates an instance with the specified settings. |
|
HttpMultipart(String subType,
String boundary)
|
Method Summary | |
---|---|
void |
addBodyPart(FormBodyPart part)
|
List<FormBodyPart> |
getBodyParts()
|
String |
getBoundary()
|
Charset |
getCharset()
|
HttpMultipartMode |
getMode()
|
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(OutputStream out)
Writes out the content in the multipart/form encoding. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HttpMultipart(String subType, Charset charset, String boundary, HttpMultipartMode mode)
subType
- mime subtype - must not be null
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
mode
- the mode to use
IllegalArgumentException
- if charset is null or boundary is nullpublic HttpMultipart(String subType, Charset charset, String boundary)
HttpMultipartMode.STRICT
subType
- mime subtype - must not be null
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 nullpublic HttpMultipart(String subType, String boundary)
Method Detail |
---|
public String getSubType()
public Charset getCharset()
public HttpMultipartMode getMode()
public List<FormBodyPart> getBodyParts()
public void addBodyPart(FormBodyPart part)
public String getBoundary()
public void writeTo(OutputStream out) throws IOException
IOException
getMode()
public long getTotalLength()
-1
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |