public interface DownloadCallback<T> extends Callback<T>
| Modifier and Type | Method and Description |
|---|---|
void |
retry(Throwable e,
int current,
int max)
Calls when download failed and the downloader will retry the download task.
|
void |
updateProgress(long done,
long total)
Calls when the progress of the download operation updated.
|
void updateProgress(long done,
long total)
done - the bytes downloadedtotal - the total bytes, -1 if unknownvoid retry(Throwable e, int current, int max)
Notes: Callback.failed(Throwable) will be called only when the download failed and the downloader won't retry
it any more. If the downloader will retry the download task, this method will be called, instead of
Callback.failed(Throwable).
e - the cause of download failurecurrent - the retry count (1 for the first, max-1 for the latest)max - the max number of triesCopyright © 2016. All rights reserved.