mirror of
https://github.com/aNNiMON/Own-Programming-Language-Tutorial.git
synced 2024-09-20 00:34:20 +03:00
Исправлен мой английский
This commit is contained in:
parent
926ae52815
commit
db939ec9ee
@ -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(
|
||||||
|
Loading…
Reference in New Issue
Block a user