Back to Vassonic

SonicDownloadCallback (sdk 3.0.0 API)

sonic-android/docs/javadoc/com/tencent/sonic/sdk/download/SonicDownloadCallback.html

3.1.14.1 KB
Original Source

跳过导航链接

com.tencent.sonic.sdk.download

接口 SonicDownloadCallback


public interfaceSonicDownloadCallback

download callback.

嵌套类概要

嵌套类 | 限定符和类型 | 接口和说明 | | --- | --- | | static class | SonicDownloadCallback.SimpleDownloadCallback an empty implementation of SonicDownloadCallback |

方法概要

所有方法 实例方法 抽象方法 | 限定符和类型 | 方法和说明 | | --- | --- | | void | onError(int errorCode) notify download failed. | | void | onFinish() notify download finish. | | void | onProgress(int pro, int total) notify the download progress. | | void | onStart() notify the download start. | | void | onSuccess(byte[] content, java.util.Map<java.lang.String,java.util.List<java.lang.String>> rspHeaders) notify download success. |

方法详细资料

- 

onStart

void onStart()

notify the download start.

- 

onProgress

void onProgress(int pro,
                int total)

notify the download progress. 参数:pro - downloaded sizetotal - total size

- 

onSuccess

void onSuccess(byte[] content,
               java.util.Map<java.lang.String,java.util.List<java.lang.String>> rspHeaders)

notify download success. 参数:content - downloaded content bytesrspHeaders - http response headers

- 

onError

void onError(int errorCode)

notify download failed. 参数:errorCode - error code

- 

onFinish

void onFinish()

notify download finish. onSuccess or onError

跳过导航链接