public class TXZDownloadManager
extends java.lang.Object
限定符和类型 | 类和说明 |
---|---|
static interface |
TXZDownloadManager.DownloadCallback
下载
|
static class |
TXZDownloadManager.DownLoadResult
下载结果的回调
|
限定符和类型 | 字段和说明 |
---|---|
static java.lang.String |
DOWNLOAD_CMD_PREFIX |
static java.lang.String |
DOWNLOAD_INVOKE_PREFIX |
static java.lang.String |
DOWNLOAD_NOTIFY |
static java.lang.String |
DOWNLOAD_RESULT |
static java.lang.String |
DOWNLOAD_START |
static java.lang.String |
DOWNLOAD_STOP |
static java.lang.String |
DOWNLOAD_TASK_ID_PREFIX |
static int |
EC_DOWNLOAD_IO
IO错误
|
static int |
EC_DOWNLOAD_NETWORK
网络错误,网络不正常
|
static int |
EC_DOWNLOAD_SERVER
下载服务器状态码异常
|
static int |
EC_DOWNLOAD_SUCCESS
下载成功
|
static int |
EC_DOWNLOAD_UNKNOWN
未知错误
|
限定符和类型 | 方法和说明 |
---|---|
static TXZDownloadManager |
getInstance()
获取单例
|
java.lang.String |
startDownload(TXZDownloadManager.DownloadCallback downloadCallback)
新建下载任务
|
void |
stopDownload(java.lang.String taskId)
停止下载任务
|
public static final java.lang.String DOWNLOAD_CMD_PREFIX
public static final java.lang.String DOWNLOAD_INVOKE_PREFIX
public static final java.lang.String DOWNLOAD_START
public static final java.lang.String DOWNLOAD_STOP
public static final java.lang.String DOWNLOAD_NOTIFY
public static final java.lang.String DOWNLOAD_RESULT
public static final java.lang.String DOWNLOAD_TASK_ID_PREFIX
public static final int EC_DOWNLOAD_SUCCESS
public static final int EC_DOWNLOAD_SERVER
public static final int EC_DOWNLOAD_IO
public static final int EC_DOWNLOAD_NETWORK
public static final int EC_DOWNLOAD_UNKNOWN
public static TXZDownloadManager getInstance()
public java.lang.String startDownload(TXZDownloadManager.DownloadCallback downloadCallback)
downloadCallback
- public void stopDownload(java.lang.String taskId)
taskId
- 传入 startDownload返回的