提交 e997c721 编写于 作者: J Jake Wharton

Change `Fetcher` to use '!= -1' logic in buffered reads.

Closes #65
上级 2bd8bd8b
......@@ -98,7 +98,7 @@ public class Fetcher {
try {
byte[] buffer = new byte[4096];
int read;
while ((read = in.read(buffer)) > -1) {
while ((read = in.read(buffer)) != -1) {
out.write(buffer, read);
if (progressListener != null) {
totalRead += read;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册