|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.http.entity.mime.MultipartEntity
public class MultipartEntity
Multipart/form coded HTTP entity consisting of multiple body parts.
| Constructor Summary | |
|---|---|
MultipartEntity()
Creates an instance using mode HttpMultipartMode.STRICT |
|
MultipartEntity(HttpMultipartMode mode)
Creates an instance using the specified HttpMultipartMode mode. |
|
MultipartEntity(HttpMultipartMode mode,
java.lang.String boundary,
java.nio.charset.Charset charset)
Creates an instance using the specified parameters |
|
| Method Summary | |
|---|---|
void |
addPart(FormBodyPart bodyPart)
|
void |
addPart(java.lang.String name,
ContentBody contentBody)
|
void |
consumeContent()
|
protected java.lang.String |
generateBoundary()
|
protected java.lang.String |
generateContentType(java.lang.String boundary,
java.nio.charset.Charset charset)
|
java.io.InputStream |
getContent()
|
org.apache.http.Header |
getContentEncoding()
|
long |
getContentLength()
|
org.apache.http.Header |
getContentType()
|
boolean |
isChunked()
|
boolean |
isRepeatable()
|
boolean |
isStreaming()
|
void |
writeTo(java.io.OutputStream outstream)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MultipartEntity(HttpMultipartMode mode,
java.lang.String boundary,
java.nio.charset.Charset charset)
mode - the mode to use, may be null, in which case HttpMultipartMode.STRICT is usedboundary - the boundary string, may be null, in which case generateBoundary() is invoked to create the stringcharset - the character set to use, may be null, in which case MIME.DEFAULT_CHARSET - i.e. US-ASCII - is used.public MultipartEntity(HttpMultipartMode mode)
HttpMultipartMode mode.
Boundary and charset are set to null.
mode - the desired modepublic MultipartEntity()
HttpMultipartMode.STRICT
| Method Detail |
|---|
protected java.lang.String generateContentType(java.lang.String boundary,
java.nio.charset.Charset charset)
protected java.lang.String generateBoundary()
public void addPart(FormBodyPart bodyPart)
public void addPart(java.lang.String name,
ContentBody contentBody)
public boolean isRepeatable()
isRepeatable in interface org.apache.http.HttpEntitypublic boolean isChunked()
isChunked in interface org.apache.http.HttpEntitypublic boolean isStreaming()
isStreaming in interface org.apache.http.HttpEntitypublic long getContentLength()
getContentLength in interface org.apache.http.HttpEntitypublic org.apache.http.Header getContentType()
getContentType in interface org.apache.http.HttpEntitypublic org.apache.http.Header getContentEncoding()
getContentEncoding in interface org.apache.http.HttpEntity
public void consumeContent()
throws java.io.IOException,
java.lang.UnsupportedOperationException
consumeContent in interface org.apache.http.HttpEntityjava.io.IOException
java.lang.UnsupportedOperationException
public java.io.InputStream getContent()
throws java.io.IOException,
java.lang.UnsupportedOperationException
getContent in interface org.apache.http.HttpEntityjava.io.IOException
java.lang.UnsupportedOperationException
public void writeTo(java.io.OutputStream outstream)
throws java.io.IOException
writeTo in interface org.apache.http.HttpEntityjava.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||