public class MultipartEntityWithProgressListener
extends 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(HttpMultipartMode mode)
base constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addPart(java.lang.String name,
ContentBody contentBody) |
ContentBody |
getPart(java.lang.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(java.io.OutputStream outstream) |
public static final int ON_PROGRESS_UPDATE_THRESHOLD
public MultipartEntityWithProgressListener(HttpMultipartMode mode)
mode
- modelistener
- listener monitoring the writing progress of the MultipartMimepublic void addPart(java.lang.String name, ContentBody contentBody)
public ContentBody getPart(java.lang.String name)
public void prepareParts()
ParseException
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
java.io.IOException