Minor code style clean up

This commit is contained in:
cyian-1756 2018-06-27 01:02:23 -04:00
parent 2c08be83f6
commit ed7df108e5
2 changed files with 4 additions and 2 deletions

View File

@ -184,7 +184,8 @@ class DownloadFileThread extends Thread {
} else {
fos = new FileOutputStream(saveAs);
}
byte[] data = new byte[1024 * 256]; int bytesRead;
byte[] data = new byte[1024 * 256];
int bytesRead;
while ( (bytesRead = bis.read(data)) != -1) {
try {
observer.stopCheck();

View File

@ -76,7 +76,8 @@ class DownloadVideoThread extends Thread {
int tries = 0; // Number of attempts to download
do {
InputStream bis = null; OutputStream fos = null;
byte[] data = new byte[1024 * 256]; int bytesRead;
byte[] data = new byte[1024 * 256];
int bytesRead;
try {
logger.info(" Downloading file: " + url + (tries > 0 ? " Retry #" + tries : ""));
observer.sendUpdate(STATUS.DOWNLOAD_STARTED, url.toExternalForm());