Retry fetching remote text file when downloading had been terminated

This commit is contained in:
huanghongxun 2019-01-13 16:50:54 +08:00
parent 481b47bf10
commit fc3f2e045b

View File

@ -126,7 +126,7 @@ public final class GetTask extends TaskResult<String> {
} }
if (size > 0 && size != read) if (size > 0 && size != read)
throw new IllegalStateException("Not completed! Readed: " + read + ", total size: " + size); throw new IOException("Not completed! Readed: " + read + ", total size: " + size);
String result = baos.toString(charset.name()); String result = baos.toString(charset.name());
setResult(result); setResult(result);