Skip to content

Commit a85c7c6

Browse files
committed
update SimpleDownloader
1 parent d214ff0 commit a85c7c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/src/com/lidroid/xutils/bitmap/download/SimpleDownloader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,12 @@ public long downloadToStream(String uri, OutputStream outputStream, final Bitmap
6464
} else {
6565
final URL url = new URL(uri);
6666
urlConnection = url.openConnection();
67-
fileLen = urlConnection.getContentLength();
6867
urlConnection.setConnectTimeout(this.getDefaultConnectTimeout());
6968
urlConnection.setReadTimeout(this.getDefaultReadTimeout());
7069
bis = new BufferedInputStream(urlConnection.getInputStream());
7170
result = urlConnection.getExpiration();
7271
result = result < System.currentTimeMillis() ? System.currentTimeMillis() + this.getDefaultExpiry() : result;
72+
fileLen = urlConnection.getContentLength();
7373
}
7474

7575
if (task.isCancelled() || task.getTargetContainer() == null) return -1;

0 commit comments

Comments
 (0)