Merge pull request #62 from mcorb/android-download-fix

downloadFile: avoid connecting twice for each download on Android
This commit is contained in:
Johannes Lumpe 2016-03-21 10:58:37 +02:00
commit cc621eec93
1 changed files with 1 additions and 1 deletions

View File

@ -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];