Merge pull request #62 from mcorb/android-download-fix
downloadFile: avoid connecting twice for each download on Android
This commit is contained in:
commit
cc621eec93
|
@ -64,7 +64,7 @@ public class Downloader extends AsyncTask<DownloadParams, int[], DownloadResult>
|
|||
|
||||
mParam.onDownloadBegin.onDownloadBegin(statusCode, lengthOfFile, headersFlat);
|
||||
|
||||
input = new BufferedInputStream(param.src.openStream(), 8 * 1024);
|
||||
input = new BufferedInputStream(connection.getInputStream(), 8 * 1024);
|
||||
output = new FileOutputStream(param.dest);
|
||||
|
||||
byte data[] = new byte[8 * 1024];
|
||||
|
|
Loading…
Reference in New Issue