public class DefaultProgress extends Object implements DownloadProgress
| 构造器和说明 |
|---|
DefaultProgress() |
DefaultProgress(String url,
File local) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
error(String url,
String thread,
int code,
String message)
下载异常
|
void |
finish(String url,
String thread)
设置已完成
|
int |
getAction() |
void |
init(String url,
String thread,
long total,
long past)
加载历史进度
|
void |
setErrorListener(DownloadListener listener) |
void |
setFinishListener(DownloadListener listener) |
void |
step(String url,
String thread,
long finish)
每次下载长度
|
void |
stop() |
public void init(String url, String thread, long total, long past)
DownloadProgressinit 在接口中 DownloadProgressurl - urlthread - 线程号total - 本次需下载past - 历史进度public void step(String url, String thread, long finish)
DownloadProgressstep 在接口中 DownloadProgressurl - urlthread - 线程号finish - 本次循环下载长度public void finish(String url, String thread)
finish 在接口中 DownloadProgressurl - urlthread - threadpublic void error(String url, String thread, int code, String message)
DownloadProgresserror 在接口中 DownloadProgressurl - urlthread - threadcode - codemessage - messagepublic void setErrorListener(DownloadListener listener)
setErrorListener 在接口中 DownloadProgresspublic void setFinishListener(DownloadListener listener)
setFinishListener 在接口中 DownloadProgresspublic int getAction()
getAction 在接口中 DownloadProgresspublic void stop()
stop 在接口中 DownloadProgressCopyright © 2024. All rights reserved.