AndBase开发框架  1.6
 全部  命名空间 文件 函数 变量 枚举值 
Public 成员函数 | 静态 Public 成员函数 | Protected 成员函数 | Private 属性 | 所有成员列表
com.ab.download.AbFileDownloader类 参考

Public 成员函数

 AbFileDownloader (Context context, DownFile downFile, int threadNum)
 
void download (AbDownloadProgressListener listener) throws Exception
 
AbDownloadThread getThreads ()
 
File getSaveFile ()
 
boolean getFlag ()
 
void setFlag (boolean flag)
 

静态 Public 成员函数

static Map< String, String > getHttpResponseHeader (HttpURLConnection http)
 
static void printResponseHeader (HttpURLConnection http)
 

Protected 成员函数

synchronized void update (DownFile downFile)
 

Private 属性

Context context
 
AbDownloadThread threads
 
DownFileDao mDownFileDao
 
File saveFile
 
DownFile mDownFile = null
 
int mThreadNum = 1
 
boolean flag = true
 

详细描述

描述:多线程支持断点续传下载器.

作者
还如一梦中
版本
v1.0
日期
:2013-3-14 下午5:00:52

构造及析构函数说明

com.ab.download.AbFileDownloader.AbFileDownloader ( Context  context,
DownFile  downFile,
int  threadNum 
)
inline

构建文件下载器.

参数
contextthe context
downFilethe down file
threadNum下载线程数

成员函数说明

void com.ab.download.AbFileDownloader.download ( AbDownloadProgressListener  listener) throws Exception
inline

开始下载文件.

参数
listener监听下载数量的变化,如果不需要了解实时下载的数量,可以设置为null
返回
已下载文件大小
异常
Exceptionthe exception
boolean com.ab.download.AbFileDownloader.getFlag ( )
inline

Gets the flag.

返回
the flag
static Map<String, String> com.ab.download.AbFileDownloader.getHttpResponseHeader ( HttpURLConnection  http)
inlinestatic

获取Http响应头字段.

参数
httpthe http
返回
the http response header
File com.ab.download.AbFileDownloader.getSaveFile ( )
inline

Gets the save file.

返回
the save file
AbDownloadThread com.ab.download.AbFileDownloader.getThreads ( )
inline

Gets the threads.

返回
the threads
static void com.ab.download.AbFileDownloader.printResponseHeader ( HttpURLConnection  http)
inlinestatic

打印Http头字段.

参数
httpthe http
void com.ab.download.AbFileDownloader.setFlag ( boolean  flag)
inline

Sets the flag.

参数
flagthe new flag
synchronized void com.ab.download.AbFileDownloader.update ( DownFile  downFile)
inlineprotected

更新指定线程最后下载的位置.

参数
downFilethe down file

类成员变量说明

Context com.ab.download.AbFileDownloader.context
private

The context.

boolean com.ab.download.AbFileDownloader.flag = true
private

The flag.

DownFile com.ab.download.AbFileDownloader.mDownFile = null
private

The m down file.

DownFileDao com.ab.download.AbFileDownloader.mDownFileDao
private

The m down file dao.

int com.ab.download.AbFileDownloader.mThreadNum = 1
private

The m thread num.

File com.ab.download.AbFileDownloader.saveFile
private

本地保存文件.

AbDownloadThread com.ab.download.AbFileDownloader.threads
private

The threads.


该类的文档由以下文件生成: