程序包 org.anyline.net
类 DefaultProgress
- java.lang.Object
-
- org.anyline.net.DefaultProgress
-
- 所有已实现的接口:
DownloadProgress
public class DefaultProgress extends Object implements DownloadProgress
-
-
构造器概要
构造器 构造器 说明 DefaultProgress()DefaultProgress(String url, File local)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voiderror(String url, String thread, int code, String message)下载异常voidfinish(String url, String thread)设置已完成intgetAction()voidinit(String url, String thread, long total, long past)加载历史进度voidsetErrorListener(DownloadListener listener)voidsetFinishListener(DownloadListener listener)voidstep(String url, String thread, long finish)每次下载长度voidstop()
-
-
-
方法详细资料
-
init
public void init(String url, String thread, long total, long past)
从接口复制的说明:DownloadProgress加载历史进度- 指定者:
init在接口中DownloadProgress- 参数:
url- urlthread- 线程号total- 本次需下载past- 历史进度
-
step
public void step(String url, String thread, long finish)
从接口复制的说明:DownloadProgress每次下载长度- 指定者:
step在接口中DownloadProgress- 参数:
url- urlthread- 线程号finish- 本次循环下载长度
-
finish
public void finish(String url, String thread)
设置已完成- 指定者:
finish在接口中DownloadProgress- 参数:
url- urlthread- thread
-
error
public void error(String url, String thread, int code, String message)
从接口复制的说明:DownloadProgress下载异常- 指定者:
error在接口中DownloadProgress- 参数:
url- urlthread- threadcode- codemessage- message
-
setErrorListener
public void setErrorListener(DownloadListener listener)
- 指定者:
setErrorListener在接口中DownloadProgress
-
setFinishListener
public void setFinishListener(DownloadListener listener)
- 指定者:
setFinishListener在接口中DownloadProgress
-
getAction
public int getAction()
- 指定者:
getAction在接口中DownloadProgress
-
stop
public void stop()
- 指定者:
stop在接口中DownloadProgress
-
-