Class DownloadTask

java.lang.Object
com.luna.common.net.download.DownloadTask

public class DownloadTask extends Object
多线程任务下载 需要服务端支持range
  • Constructor Details

    • DownloadTask

      public DownloadTask(String url, String localPath, int threadCount)
  • Method Details

    • addDownloadTaskListener

      public void addDownloadTaskListener(DownloadTaskListener listener)
    • startDown

      public void startDown() throws Exception
      Throws:
      Exception
    • getDebug

      public boolean getDebug()
    • getDownloadProgress

      public float getDownloadProgress()
      Returns:
      the progree between 0 and 100;return -1 if download not started
    • getContentLength

      public long getContentLength()
    • getDownload

      public long getDownload()