Исправлен мой английский

This commit is contained in:
Victor 2016-12-10 21:17:27 +02:00
parent 926ae52815
commit db939ec9ee

View File

@ -58,10 +58,10 @@ public final class downloader implements Module {
OutputStream os = new FileOutputStream(Console.fileInstance(filePath))) { OutputStream os = new FileOutputStream(Console.fileInstance(filePath))) {
int downloaded = 0; int downloaded = 0;
final byte[] buffer = new byte[bufferSize]; final byte[] buffer = new byte[bufferSize];
int readed; int read;
while ((readed = is.read(buffer, 0, bufferSize)) != -1) { while ((read = is.read(buffer, 0, bufferSize)) != -1) {
os.write(buffer, 0, readed); os.write(buffer, 0, read);
downloaded += readed; downloaded += read;
if (calculateProgressEnabled) { if (calculateProgressEnabled) {
final int percent = (int) (downloaded / ((double) contentLength) * 100.0); final int percent = (int) (downloaded / ((double) contentLength) * 100.0);
progressCallback.execute( progressCallback.execute(