public class

MultipartEntity

extends Object
implements HttpEntity
java.lang.Object
   ↳ org.apache.http.entity.mime.MultipartEntity

Class Overview

Multipart/form coded HTTP entity consisting of multiple body parts.

Summary

Public Constructors
MultipartEntity(HttpMultipartMode mode, String boundary, Charset charset)
Creates an instance using the specified parameters
MultipartEntity(HttpMultipartMode mode)
Creates an instance using the specified HttpMultipartMode mode.
MultipartEntity()
Creates an instance using mode STRICT
Public Methods
void addPart(String name, ContentBody contentBody)
void addPart(FormBodyPart bodyPart)
void consumeContent()
InputStream getContent()
Header getContentEncoding()
long getContentLength()
Header getContentType()
boolean isChunked()
boolean isRepeatable()
boolean isStreaming()
void writeTo(OutputStream outstream)
Protected Methods
String generateBoundary()
String generateContentType(String boundary, Charset charset)
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.apache.http.HttpEntity

Public Constructors

public MultipartEntity (HttpMultipartMode mode, String boundary, Charset charset)

Creates an instance using the specified parameters

Parameters
mode the mode to use, may be null, in which case STRICT is used
boundary the boundary string, may be null, in which case generateBoundary() is invoked to create the string
charset the character set to use, may be null, in which case DEFAULT_CHARSET - i.e. US-ASCII - is used.

public MultipartEntity (HttpMultipartMode mode)

Creates an instance using the specified HttpMultipartMode mode. Boundary and charset are set to null.

Parameters
mode the desired mode

public MultipartEntity ()

Creates an instance using mode STRICT

Public Methods

public void addPart (String name, ContentBody contentBody)

public void addPart (FormBodyPart bodyPart)

public void consumeContent ()

public Header getContentEncoding ()

public long getContentLength ()

public Header getContentType ()

public boolean isChunked ()

public boolean isRepeatable ()

public boolean isStreaming ()

public void writeTo (OutputStream outstream)

Throws
IOException

Protected Methods

protected String generateBoundary ()

protected String generateContentType (String boundary, Charset charset)