Back to project page VideoExtand.
The source code is released under:
Apache License
If you think the Android project VideoExtand listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
/** * /*from w w w . java 2 s .com*/ */ package com.yuninfo.videoextand.uploader; import java.io.IOException; import java.io.OutputStream; import java.nio.charset.Charset; import org.apache.http.entity.mime.HttpMultipartMode; import org.apache.http.entity.mime.MultipartEntity; /** * * @author zhangyy@yuninfo.com * */ public class ProgressMultipartEntity extends MultipartEntity { private ProgressListener<Long> mProgressListener = null; public ProgressMultipartEntity() { super(); } public ProgressMultipartEntity(HttpMultipartMode mode, String boundary, Charset charset) { super(mode, boundary, charset); } public ProgressMultipartEntity(HttpMultipartMode mode) { super(mode); } @Override public void writeTo(OutputStream outstream) throws IOException { super.writeTo(new ProgressOutputStream(outstream, getContentLength(), this.mProgressListener)); } public void setProgressListener(ProgressListener<Long> listener) { this.mProgressListener = listener; } }