Android Open Source - VideoExtand Progress Multipart Entity






From Project

Back to project page VideoExtand.

License

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.

Java Source Code

/**
 * /*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;
  }
  
}




Java Source Code List

com.example.androidtest.MainActivity.java
com.yuninfo.videoextand.BaseActivity.java
com.yuninfo.videoextand.Config.java
com.yuninfo.videoextand.ReadCardActivity.java
com.yuninfo.videoextand.SendCardActivity.java
com.yuninfo.videoextand.bean.CommonReq.java
com.yuninfo.videoextand.bean.ReadVideoResp.java
com.yuninfo.videoextand.bean.SendVideoResp.java
com.yuninfo.videoextand.bean.UploadReq.java
com.yuninfo.videoextand.bean.UploadResp.java
com.yuninfo.videoextand.player.VideoPlayerActivity.java
com.yuninfo.videoextand.recorder.RecorderActivity.java
com.yuninfo.videoextand.uploader.ProgressListener.java
com.yuninfo.videoextand.uploader.ProgressMultipartEntity.java
com.yuninfo.videoextand.uploader.ProgressOutputStream.java
com.yuninfo.videoextand.uploader.UploadHandler.java
com.yuninfo.videoextand.uploader.UploadThread.java
com.yuninfo.videoextand.utils.BeanRefUtil.java
com.yuninfo.videoextand.utils.DateUtil.java
com.yuninfo.videoextand.utils.FileUtil.java
com.yuninfo.videoextand.utils.HttpUtil.java
com.yuninfo.videoextand.utils.LogUtil.java
com.yuninfo.videoextand.utils.StringUtil.java
com.yuninfo.videoextand.widget.CustomPopupWindow.java
com.yuninfo.videoextand.widget.TitleBar.java
com.yuninfo.videoextand.widget.dialog.MenuDialog.java