| 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

构建文件下载器.

参数

  context | the context
  downFile | the down file
  threadNum | 下载线程数

## 成员函数说明

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

开始下载文件.

参数

  listener | 监听下载数量的变化,如果不需要了解实时下载的数量,可以设置为null

返回
  已下载文件大小

异常

  Exception | the exception

boolean com.ab.download.AbFileDownloader.getFlag | ( |  | ) |
| inline

Gets the flag.

返回
  the flag

static Map<String, String> com.ab.download.AbFileDownloader.getHttpResponseHeader | ( | HttpURLConnection | http | ) |
| inline static

获取Http响应头字段.

参数

  http | the 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 | ) |
| inline static

打印Http头字段.

参数

  http | the http

void com.ab.download.AbFileDownloader.setFlag | ( | boolean | flag | ) |
| inline

Sets the flag.

参数

  flag | the new flag

synchronized void com.ab.download.AbFileDownloader.update | ( | DownFile | downFile | ) |
| inline protected

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

参数

  downFile | the 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.

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

- src/com/ab/download/AbFileDownloader.java