Filedownloader: java.lang.RuntimeException: sofar[4713507] not equal total[4709411]

Created on 28 Oct 2016  路  3Comments  路  Source: lingochamp/FileDownloader

got this exception when the download is about to finish.

W/System.err: java.lang.RuntimeException: sofar[4713507] not equal total[4709411]
    at (FileDownloadRunnable.java:484)
question

All 3 comments

Occur such exception, because the value of 'content-length' inside the Response-Header is not equal to the real length in the input-stream from the back-end.

@Jacksgong sir, is there any way to ignore this error and continue the download?

For simple way, you can ignore this error by yourself, because when you get the FileDownloader#error callback with this error message, FileDownloader has already completed fetch all data from the network input stream, and FileDownloader will not delete the downloaded file. So if you receive this error message in error callback, you just do some completed thing you want in it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chriswiesner picture chriswiesner  路  4Comments

bluemix picture bluemix  路  4Comments

itsmallsun picture itsmallsun  路  4Comments

asdf19910719 picture asdf19910719  路  4Comments

vd92 picture vd92  路  3Comments