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)
base constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPart(String name,
org.apache.http.entity.mime.content.ContentBody contentBody) |
org.apache.http.entity.mime.content.ContentBody |
getPart(String name) |
void |
prepareParts()
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(OutputStream outstream) |
public static final int ON_PROGRESS_UPDATE_THRESHOLD
public MultipartEntityWithProgressListener(org.apache.http.entity.mime.HttpMultipartMode mode)
mode - modelistener - listener monitoring the writing progress of the MultipartMimepublic void addPart(String name, org.apache.http.entity.mime.content.ContentBody contentBody)
addPart in class org.apache.http.entity.mime.MultipartEntitypublic org.apache.http.entity.mime.content.ContentBody getPart(String name)
public void prepareParts()
ParseExceptionpublic void setListener(IFileTransferListener listener)
listener - upload listenerpublic static void setOnProgressUpdateThreshold(int threshold)
ON_PROGRESS_UPDATE_THRESHOLDthreshold - thresholdpublic void writeTo(OutputStream outstream) throws IOException
writeTo in interface org.apache.http.HttpEntitywriteTo in class org.apache.http.entity.mime.MultipartEntityIOExceptionCopyright © 2014. All Rights Reserved.