public class MultipartEntityWithProgressListener
extends org.apache.http.entity.mime.MultipartEntity
Modifier and Type | Class and Description |
---|---|
static class |
MultipartEntityWithProgressListener.InterruptedMultipartException |
Modifier and Type | Field and Description |
---|---|
static int |
ON_PROGRESS_UPDATE_THRESHOLD
Default minimum time between two progress messages being sent out.
|
Constructor and Description |
---|
MultipartEntityWithProgressListener(org.apache.http.entity.mime.HttpMultipartMode mode) |
Modifier and Type | Method and Description |
---|---|
void |
addBoxJSONStringEntityPart(java.lang.String name,
IBoxJSONStringEntity entity) |
void |
addContentBodyPart(java.lang.String name,
org.apache.http.entity.mime.content.ContentBody contentBody) |
org.apache.http.entity.mime.content.ContentBody |
getContentBodyPart(java.lang.String name) |
IBoxJSONStringEntity |
getJSONStringEntityPart(java.lang.String name) |
void |
prepareParts(IBoxJSONParser parser)
Method to put all parts in to the multipart entity.
|
void |
setListener(IFileTransferListener listener)
Set upload listener.
|
static void |
setOnProgressUpdateThreshold(int threshold)
Set the threshold time for progress updating.
|
void |
writeTo(java.io.OutputStream outstream) |
public static final int ON_PROGRESS_UPDATE_THRESHOLD
public MultipartEntityWithProgressListener(org.apache.http.entity.mime.HttpMultipartMode mode)
public void addContentBodyPart(java.lang.String name, org.apache.http.entity.mime.content.ContentBody contentBody)
public org.apache.http.entity.mime.content.ContentBody getContentBodyPart(java.lang.String name)
public void addBoxJSONStringEntityPart(java.lang.String name, IBoxJSONStringEntity entity)
public IBoxJSONStringEntity getJSONStringEntityPart(java.lang.String name)
public void prepareParts(IBoxJSONParser parser) throws java.io.UnsupportedEncodingException, BoxJSONException
BoxJSONException
java.io.UnsupportedEncodingException
public void setListener(IFileTransferListener listener)
listener
- upload listenerpublic static void setOnProgressUpdateThreshold(int threshold)
ON_PROGRESS_UPDATE_THRESHOLD
threshold
- thresholdpublic void writeTo(java.io.OutputStream outstream) throws java.io.IOException
writeTo
in interface org.apache.http.HttpEntity
writeTo
in class org.apache.http.entity.mime.MultipartEntity
java.io.IOException