Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

public interface CDownloadListener {
void onPreStart();
void onProgress(long maxSIze, long currentSize);
void onProgress(long maxSize, long currentSize);
void onComplete(String localFilePath);
void onError(String errorMessage);
void onCancel();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public static boolean downloadFile(String fileUrl, String localFilePath, CDownlo
// 设置下载区间
con.setRequestProperty("range", "bytes=" + size + "-");
con.connect();
maxSize = con.getContentLength();
maxSize = con.getContentLength() + size;
long currentSize = 0;
// 只要断点下载,返回的已经不是200,206
int code = con.getResponseCode();
Expand Down