sonic-android/docs/javadoc/com/tencent/sonic/sdk/download/SonicDownloadCallback.html
com.tencent.sonic.sdk.download
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.
|
-
void onStart()
notify the download start.
-
void onProgress(int pro,
int total)
notify the download progress.
参数:pro - downloaded sizetotal - total size
-
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
-
void onError(int errorCode)
notify download failed.
参数:errorCode - error code
-
void onFinish()
notify download finish. onSuccess or onError