public class ModifiedMultipartEntity extends Object implements org.apache.http.HttpEntity
| Constructor and Description |
|---|
ModifiedMultipartEntity()
Creates an instance using mode
HttpMultipartMode.STRICT |
ModifiedMultipartEntity(org.apache.http.entity.mime.HttpMultipartMode mode)
Creates an instance using the specified
HttpMultipartMode mode. |
ModifiedMultipartEntity(org.apache.http.entity.mime.HttpMultipartMode mode,
String boundary,
Charset charset)
Creates an instance using the specified parameters
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPart(org.apache.http.entity.mime.FormBodyPart bodyPart) |
void |
addPart(String name,
org.apache.http.entity.mime.content.ContentBody contentBody) |
void |
consumeContent()
Deprecated.
|
protected String |
generateBoundary() |
protected String |
generateContentType(String boundary,
Charset charset) |
InputStream |
getContent() |
org.apache.http.Header |
getContentEncoding() |
long |
getContentLength() |
org.apache.http.Header |
getContentType() |
boolean |
isChunked() |
boolean |
isRepeatable() |
boolean |
isStreaming() |
void |
writeTo(OutputStream outstream) |
public ModifiedMultipartEntity(org.apache.http.entity.mime.HttpMultipartMode mode,
String boundary,
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 ModifiedMultipartEntity(org.apache.http.entity.mime.HttpMultipartMode mode)
HttpMultipartMode mode.
Boundary and charset are set to null.mode - the desired modepublic ModifiedMultipartEntity()
HttpMultipartMode.STRICTprotected String generateBoundary()
public void addPart(org.apache.http.entity.mime.FormBodyPart bodyPart)
public void addPart(String name, org.apache.http.entity.mime.content.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@Deprecated public void consumeContent() throws IOException, UnsupportedOperationException
consumeContent in interface org.apache.http.HttpEntityIOExceptionUnsupportedOperationExceptionpublic InputStream getContent() throws IOException, UnsupportedOperationException
getContent in interface org.apache.http.HttpEntityIOExceptionUnsupportedOperationExceptionpublic void writeTo(OutputStream outstream) throws IOException
writeTo in interface org.apache.http.HttpEntityIOException