mirror of
https://github.com/tonikelope/megabasterd.git
synced 2025-05-12 20:44:32 +02:00
6.29
-Fix queue down button -Refactoring
This commit is contained in:
parent
d71ede25d4
commit
d235935a1a
2
pom.xml
2
pom.xml
@ -3,7 +3,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.tonikelope</groupId>
|
||||
<artifactId>MegaBasterd</artifactId>
|
||||
<version>6.28</version>
|
||||
<version>6.29</version>
|
||||
<packaging>jar</packaging>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
|
@ -4,6 +4,7 @@ import static com.tonikelope.megabasterd.MainPanel.*;
|
||||
import static com.tonikelope.megabasterd.MiscTools.*;
|
||||
import java.awt.Color;
|
||||
import java.awt.Dialog;
|
||||
import java.util.logging.Logger;
|
||||
import javax.swing.JOptionPane;
|
||||
|
||||
/**
|
||||
@ -359,4 +360,5 @@ public final class AboutDialog extends javax.swing.JDialog {
|
||||
private javax.swing.JLabel subtitle_label;
|
||||
private javax.swing.JLabel title_label;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
private static final Logger LOG = Logger.getLogger(AboutDialog.class.getName());
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ public class ChunkDownloader implements Runnable, SecureSingleThreadNotifiable {
|
||||
_secure_notify_lock.wait();
|
||||
} catch (InterruptedException ex) {
|
||||
_exit = true;
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
@ -101,7 +101,7 @@ public class ChunkDownloader implements Runnable, SecureSingleThreadNotifiable {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} Worker [{1}]: let''s do some work!", new Object[]{Thread.currentThread().getName(), _id});
|
||||
LOG.log(Level.INFO, "{0} Worker [{1}]: let''s do some work!", new Object[]{Thread.currentThread().getName(), _id});
|
||||
|
||||
HttpURLConnection con;
|
||||
|
||||
@ -185,7 +185,7 @@ public class ChunkDownloader implements Runnable, SecureSingleThreadNotifiable {
|
||||
|
||||
} else {
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} Worker [{1}] SmartProxy getFastestProxy returned NULL!", new Object[]{Thread.currentThread().getName(), _id});
|
||||
LOG.log(Level.INFO, "{0} Worker [{1}] SmartProxy getFastestProxy returned NULL!", new Object[]{Thread.currentThread().getName(), _id});
|
||||
|
||||
URL url = new URL(chunk_url);
|
||||
|
||||
@ -235,7 +235,7 @@ public class ChunkDownloader implements Runnable, SecureSingleThreadNotifiable {
|
||||
|
||||
File tmp_chunk_file = null, chunk_file = null;
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} Worker [{1}] is downloading chunk [{2}]!", new Object[]{Thread.currentThread().getName(), _id, chunk_id});
|
||||
LOG.log(Level.INFO, "{0} Worker [{1}] is downloading chunk [{2}]!", new Object[]{Thread.currentThread().getName(), _id, chunk_id});
|
||||
|
||||
try {
|
||||
|
||||
@ -245,7 +245,7 @@ public class ChunkDownloader implements Runnable, SecureSingleThreadNotifiable {
|
||||
|
||||
if (http_status != 200) {
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} Worker [{1}] Failed chunk download : HTTP error code : {2}", new Object[]{Thread.currentThread().getName(), _id, http_status});
|
||||
LOG.log(Level.INFO, "{0} Worker [{1}] Failed chunk download : HTTP error code : {2}", new Object[]{Thread.currentThread().getName(), _id, http_status});
|
||||
|
||||
http_error = http_status;
|
||||
|
||||
@ -296,7 +296,7 @@ public class ChunkDownloader implements Runnable, SecureSingleThreadNotifiable {
|
||||
|
||||
} else {
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} Worker [{1}] has RECOVERED PREVIOUS chunk [{2}]!", new Object[]{Thread.currentThread().getName(), _id, chunk_id});
|
||||
LOG.log(Level.INFO, "{0} Worker [{1}] has RECOVERED PREVIOUS chunk [{2}]!", new Object[]{Thread.currentThread().getName(), _id, chunk_id});
|
||||
|
||||
finish_chunk_time = -1;
|
||||
|
||||
@ -311,7 +311,7 @@ public class ChunkDownloader implements Runnable, SecureSingleThreadNotifiable {
|
||||
|
||||
if (chunk_reads == chunk_size) {
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} Worker [{1}] has DOWNLOADED chunk [{2}]!", new Object[]{Thread.currentThread().getName(), _id, chunk_id});
|
||||
LOG.log(Level.INFO, "{0} Worker [{1}] has DOWNLOADED chunk [{2}]!", new Object[]{Thread.currentThread().getName(), _id, chunk_id});
|
||||
|
||||
if (tmp_chunk_file != null && chunk_file != null && (!chunk_file.exists() || chunk_file.length() != chunk_size)) {
|
||||
|
||||
@ -340,7 +340,7 @@ public class ChunkDownloader implements Runnable, SecureSingleThreadNotifiable {
|
||||
|
||||
if (chunk_speed < Math.round(avg_chunk_speed * SLOW_PROXY_PERC)) {
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} Worker [{1}] WARNING -> PROXY {2} CHUNK DOWNLOAD SPEED: {3}/s SEEMS TO BE SLOW (average is {4}/s)", new Object[]{Thread.currentThread().getName(), _id, _current_smart_proxy, formatBytes(chunk_speed), formatBytes(avg_chunk_speed)});
|
||||
LOG.log(Level.INFO, "{0} Worker [{1}] WARNING -> PROXY {2} CHUNK DOWNLOAD SPEED: {3}/s SEEMS TO BE SLOW (average is {4}/s)", new Object[]{Thread.currentThread().getName(), _id, _current_smart_proxy, formatBytes(chunk_speed), formatBytes(avg_chunk_speed)});
|
||||
|
||||
slow_proxy = true;
|
||||
}
|
||||
@ -361,7 +361,7 @@ public class ChunkDownloader implements Runnable, SecureSingleThreadNotifiable {
|
||||
timeout = true;
|
||||
}
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex.getMessage());
|
||||
LOG.log(Level.SEVERE, null, ex.getMessage());
|
||||
|
||||
} finally {
|
||||
|
||||
@ -369,7 +369,7 @@ public class ChunkDownloader implements Runnable, SecureSingleThreadNotifiable {
|
||||
|
||||
if (!_exit && !_download.isStopped()) {
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} Worker [{1}] has FAILED downloading chunk [{2}]!", new Object[]{Thread.currentThread().getName(), _id, chunk_id});
|
||||
LOG.log(Level.INFO, "{0} Worker [{1}] has FAILED downloading chunk [{2}]!", new Object[]{Thread.currentThread().getName(), _id, chunk_id});
|
||||
|
||||
}
|
||||
|
||||
@ -411,7 +411,7 @@ public class ChunkDownloader implements Runnable, SecureSingleThreadNotifiable {
|
||||
|
||||
_download.stopDownloader(error.getMessage());
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, error.getMessage());
|
||||
LOG.log(Level.SEVERE, null, error.getMessage());
|
||||
|
||||
}
|
||||
|
||||
@ -419,6 +419,7 @@ public class ChunkDownloader implements Runnable, SecureSingleThreadNotifiable {
|
||||
|
||||
_download.getChunkmanager().secureNotify();
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} Worker [{1}]: bye bye", new Object[]{Thread.currentThread().getName(), _id});
|
||||
LOG.log(Level.INFO, "{0} Worker [{1}]: bye bye", new Object[]{Thread.currentThread().getName(), _id});
|
||||
}
|
||||
private static final Logger LOG = Logger.getLogger(ChunkDownloader.class.getName());
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ public class ChunkDownloaderMono extends ChunkDownloader {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} Worker [{1}]: let''s do some work!", new Object[]{Thread.currentThread().getName(), getId()});
|
||||
LOG.log(Level.INFO, "{0} Worker [{1}]: let''s do some work!", new Object[]{Thread.currentThread().getName(), getId()});
|
||||
|
||||
HttpURLConnection con = null;
|
||||
|
||||
@ -98,7 +98,7 @@ public class ChunkDownloaderMono extends ChunkDownloader {
|
||||
|
||||
if (http_status != 200) {
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} Failed : HTTP error code : {1}", new Object[]{Thread.currentThread().getName(), http_status});
|
||||
LOG.log(Level.INFO, "{0} Failed : HTTP error code : {1}", new Object[]{Thread.currentThread().getName(), http_status});
|
||||
|
||||
http_error = http_status;
|
||||
|
||||
@ -164,7 +164,7 @@ public class ChunkDownloaderMono extends ChunkDownloader {
|
||||
|
||||
} catch (IOException ex) {
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
|
||||
} finally {
|
||||
|
||||
@ -205,14 +205,15 @@ public class ChunkDownloaderMono extends ChunkDownloader {
|
||||
|
||||
} catch (OutOfMemoryError | Exception error) {
|
||||
getDownload().stopDownloader(error.getMessage());
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, error.getMessage());
|
||||
LOG.log(Level.SEVERE, null, error.getMessage());
|
||||
}
|
||||
|
||||
getDownload().stopThisSlot(this);
|
||||
|
||||
getDownload().secureNotify();
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} Worker [{1}]: bye bye", new Object[]{Thread.currentThread().getName(), getId()});
|
||||
LOG.log(Level.INFO, "{0} Worker [{1}]: bye bye", new Object[]{Thread.currentThread().getName(), getId()});
|
||||
|
||||
}
|
||||
private static final Logger LOG = Logger.getLogger(ChunkDownloaderMono.class.getName());
|
||||
}
|
||||
|
@ -1,5 +1,7 @@
|
||||
package com.tonikelope.megabasterd;
|
||||
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author tonikelope
|
||||
@ -9,5 +11,6 @@ public final class ChunkInvalidException extends Exception {
|
||||
public ChunkInvalidException(String message) {
|
||||
super(message);
|
||||
}
|
||||
private static final Logger LOG = Logger.getLogger(ChunkInvalidException.class.getName());
|
||||
|
||||
}
|
||||
|
@ -67,10 +67,6 @@ public final class ChunkManager implements Runnable, SecureSingleThreadNotifiabl
|
||||
private boolean _notified;
|
||||
private final String _chunks_dir;
|
||||
|
||||
public String getChunks_dir() {
|
||||
return _chunks_dir;
|
||||
}
|
||||
|
||||
public ChunkManager(Download downloader) throws Exception {
|
||||
_notified = false;
|
||||
_exit = false;
|
||||
@ -93,10 +89,14 @@ public final class ChunkManager implements Runnable, SecureSingleThreadNotifiabl
|
||||
_bytes_written = _download.getProgress();
|
||||
}
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} Chunkmanager hello LAST CHUNK WRITTEN -> [{1}] {2}...", new Object[]{Thread.currentThread().getName(), _last_chunk_id_written, _bytes_written});
|
||||
LOG.log(Level.INFO, "{0} Chunkmanager hello LAST CHUNK WRITTEN -> [{1}] {2}...", new Object[]{Thread.currentThread().getName(), _last_chunk_id_written, _bytes_written});
|
||||
|
||||
}
|
||||
|
||||
public String getChunks_dir() {
|
||||
return _chunks_dir;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void secureNotify() {
|
||||
synchronized (_secure_notify_lock) {
|
||||
@ -117,7 +117,7 @@ public final class ChunkManager implements Runnable, SecureSingleThreadNotifiabl
|
||||
_secure_notify_lock.wait();
|
||||
} catch (InterruptedException ex) {
|
||||
_exit = true;
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
@ -139,8 +139,6 @@ public final class ChunkManager implements Runnable, SecureSingleThreadNotifiabl
|
||||
|
||||
chunks_temp_dir.mkdirs();
|
||||
|
||||
System.out.println(chunks_temp_dir.getAbsolutePath());
|
||||
|
||||
return chunks_temp_dir.getAbsolutePath();
|
||||
}
|
||||
|
||||
@ -158,7 +156,7 @@ public final class ChunkManager implements Runnable, SecureSingleThreadNotifiabl
|
||||
|
||||
try {
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} Chunkmanager: let's do some work!", Thread.currentThread().getName());
|
||||
LOG.log(Level.INFO, "{0} Chunkmanager: let's do some work!", Thread.currentThread().getName());
|
||||
|
||||
boolean download_finished = false;
|
||||
|
||||
@ -189,12 +187,12 @@ public final class ChunkManager implements Runnable, SecureSingleThreadNotifiabl
|
||||
_download.getOutput_stream().write(buffer, 0, reads);
|
||||
}
|
||||
} catch (NoSuchAlgorithmException | NoSuchPaddingException | InvalidKeyException | InvalidAlgorithmParameterException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
|
||||
_bytes_written += chunk_file.length();
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} Chunkmanager has written to disk chunk [{1}] {2} {3}...", new Object[]{Thread.currentThread().getName(), _last_chunk_id_written + 1, _bytes_written, _download.calculateLastWrittenChunk(_bytes_written)});
|
||||
LOG.log(Level.INFO, "{0} Chunkmanager has written to disk chunk [{1}] {2} {3}...", new Object[]{Thread.currentThread().getName(), _last_chunk_id_written + 1, _bytes_written, _download.calculateLastWrittenChunk(_bytes_written)});
|
||||
|
||||
_last_chunk_id_written++;
|
||||
|
||||
@ -205,7 +203,7 @@ public final class ChunkManager implements Runnable, SecureSingleThreadNotifiabl
|
||||
|
||||
if (!_exit && (!_download.isStopped() || !_download.getChunkworkers().isEmpty()) && _bytes_written < _file_size) {
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} Chunkmanager waiting for chunk [{1}]...", new Object[]{Thread.currentThread().getName(), _last_chunk_id_written + 1});
|
||||
LOG.log(Level.INFO, "{0} Chunkmanager waiting for chunk [{1}]...", new Object[]{Thread.currentThread().getName(), _last_chunk_id_written + 1});
|
||||
|
||||
secureWait();
|
||||
|
||||
@ -219,7 +217,7 @@ public final class ChunkManager implements Runnable, SecureSingleThreadNotifiabl
|
||||
|
||||
} catch (IOException ex) {
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
_download.stopDownloader(ex.getMessage());
|
||||
}
|
||||
|
||||
@ -227,7 +225,8 @@ public final class ChunkManager implements Runnable, SecureSingleThreadNotifiabl
|
||||
|
||||
_download.secureNotify();
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} Chunkmanager: bye bye{1}", new Object[]{Thread.currentThread().getName(), _download.getFile().getName()});
|
||||
LOG.log(Level.INFO, "{0} Chunkmanager: bye bye{1}", new Object[]{Thread.currentThread().getName(), _download.getFile().getName()});
|
||||
}
|
||||
private static final Logger LOG = Logger.getLogger(ChunkManager.class.getName());
|
||||
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ public class ChunkUploader implements Runnable, SecureSingleThreadNotifiable {
|
||||
_secure_notify_lock.wait();
|
||||
} catch (InterruptedException ex) {
|
||||
_exit = true;
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
@ -93,7 +93,7 @@ public class ChunkUploader implements Runnable, SecureSingleThreadNotifiable {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} ChunkUploader {1} hello! {2}", new Object[]{Thread.currentThread().getName(), getId(), getUpload().getFile_name()});
|
||||
LOG.log(Level.INFO, "{0} ChunkUploader {1} hello! {2}", new Object[]{Thread.currentThread().getName(), getId(), getUpload().getFile_name()});
|
||||
|
||||
long chunk_id = 0;
|
||||
|
||||
@ -174,7 +174,7 @@ public class ChunkUploader implements Runnable, SecureSingleThreadNotifiable {
|
||||
|
||||
try (CipherInputStream cis = new CipherInputStream(Channels.newInputStream(f.getChannel()), genCrypter("AES", "AES/CTR/NoPadding", _upload.getByte_file_key(), forwardMEGALinkKeyIV(_upload.getByte_file_iv(), chunk_offset))); OutputStream out = new ThrottledOutputStream(con.getOutputStream(), _upload.getMain_panel().getStream_supervisor())) {
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} Uploading chunk {1} from worker {2}...", new Object[]{Thread.currentThread().getName(), chunk_id, _id});
|
||||
LOG.log(Level.INFO, "{0} Uploading chunk {1} from worker {2}...", new Object[]{Thread.currentThread().getName(), chunk_id, _id});
|
||||
|
||||
while (!_exit && !_upload.isStopped() && tot_bytes_up < chunk_size && (reads = cis.read(buffer)) != -1) {
|
||||
out.write(buffer, 0, reads);
|
||||
@ -199,7 +199,7 @@ public class ChunkUploader implements Runnable, SecureSingleThreadNotifiable {
|
||||
|
||||
if ((http_status = con.getResponseCode()) != 200) {
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} Failed : HTTP error code : {1}", new Object[]{Thread.currentThread().getName(), http_status});
|
||||
LOG.log(Level.INFO, "{0} Failed : HTTP error code : {1}", new Object[]{Thread.currentThread().getName(), http_status});
|
||||
|
||||
} else if (tot_bytes_up == chunk_size || reads == -1) {
|
||||
|
||||
@ -220,11 +220,11 @@ public class ChunkUploader implements Runnable, SecureSingleThreadNotifiable {
|
||||
|
||||
if (MegaAPI.checkMEGAError(httpresponse) != 0) {
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.WARNING, "{0} UPLOAD FAILED! (MEGA ERROR: {1})", new Object[]{Thread.currentThread().getName(), MegaAPI.checkMEGAError(httpresponse)});
|
||||
LOG.log(Level.WARNING, "{0} UPLOAD FAILED! (MEGA ERROR: {1})", new Object[]{Thread.currentThread().getName(), MegaAPI.checkMEGAError(httpresponse)});
|
||||
|
||||
} else {
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} Completion handle -> {1}", new Object[]{Thread.currentThread().getName(), httpresponse});
|
||||
LOG.log(Level.INFO, "{0} Completion handle -> {1}", new Object[]{Thread.currentThread().getName(), httpresponse});
|
||||
|
||||
_upload.setCompletion_handle(httpresponse);
|
||||
|
||||
@ -246,13 +246,13 @@ public class ChunkUploader implements Runnable, SecureSingleThreadNotifiable {
|
||||
|
||||
} catch (IOException ex) {
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex.getMessage());
|
||||
LOG.log(Level.SEVERE, null, ex.getMessage());
|
||||
|
||||
} finally {
|
||||
|
||||
if (chunk_error) {
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.WARNING, "{0} Uploading chunk {1} from worker {2} FAILED!...", new Object[]{Thread.currentThread().getName(), chunk_id, _id});
|
||||
LOG.log(Level.WARNING, "{0} Uploading chunk {1} from worker {2} FAILED!...", new Object[]{Thread.currentThread().getName(), chunk_id, _id});
|
||||
|
||||
_upload.rejectChunkId(chunk_id);
|
||||
|
||||
@ -269,7 +269,7 @@ public class ChunkUploader implements Runnable, SecureSingleThreadNotifiable {
|
||||
|
||||
_upload.stopUploader("UPLOAD FAILED: too many errors");
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, "UPLOAD FAILED: too many errors");
|
||||
LOG.log(Level.SEVERE, null, "UPLOAD FAILED: too many errors");
|
||||
|
||||
} else {
|
||||
|
||||
@ -292,7 +292,7 @@ public class ChunkUploader implements Runnable, SecureSingleThreadNotifiable {
|
||||
|
||||
} else {
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} Worker {1} has uploaded chunk {2}", new Object[]{Thread.currentThread().getName(), _id, chunk_id});
|
||||
LOG.log(Level.INFO, "{0} Worker {1} has uploaded chunk {2}", new Object[]{Thread.currentThread().getName(), _id, chunk_id});
|
||||
|
||||
conta_error = 0;
|
||||
}
|
||||
@ -306,15 +306,16 @@ public class ChunkUploader implements Runnable, SecureSingleThreadNotifiable {
|
||||
|
||||
} catch (OutOfMemoryError | Exception error) {
|
||||
_upload.stopUploader(error.getMessage());
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, error.getMessage());
|
||||
LOG.log(Level.SEVERE, null, error.getMessage());
|
||||
}
|
||||
|
||||
_upload.stopThisSlot(this);
|
||||
|
||||
_upload.getMac_generator().secureNotify();
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} ChunkUploader {1} bye bye...", new Object[]{Thread.currentThread().getName(), _id});
|
||||
LOG.log(Level.INFO, "{0} ChunkUploader {1} bye bye...", new Object[]{Thread.currentThread().getName(), _id});
|
||||
|
||||
}
|
||||
private static final Logger LOG = Logger.getLogger(ChunkUploader.class.getName());
|
||||
|
||||
}
|
||||
|
@ -56,10 +56,10 @@ public final class ClipboardSpy implements Runnable, ClipboardOwner, SecureSingl
|
||||
|
||||
gainOwnership(_contents);
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} Monitoring clipboard ON...", Thread.currentThread().getName());
|
||||
LOG.log(Level.INFO, "{0} Monitoring clipboard ON...", Thread.currentThread().getName());
|
||||
|
||||
} else {
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} Monitoring clipboard OFF...", Thread.currentThread().getName());
|
||||
LOG.log(Level.INFO, "{0} Monitoring clipboard OFF...", Thread.currentThread().getName());
|
||||
}
|
||||
}
|
||||
|
||||
@ -82,7 +82,7 @@ public final class ClipboardSpy implements Runnable, ClipboardOwner, SecureSingl
|
||||
try {
|
||||
_secure_notify_lock.wait();
|
||||
} catch (InterruptedException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(SEVERE, null, ex);
|
||||
LOG.log(SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
@ -129,7 +129,7 @@ public final class ClipboardSpy implements Runnable, ClipboardOwner, SecureSingl
|
||||
try {
|
||||
sleep(SLEEP);
|
||||
} catch (InterruptedException ex1) {
|
||||
Logger.getLogger(getClass().getName()).log(SEVERE, null, ex1);
|
||||
LOG.log(SEVERE, null, ex1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -156,7 +156,7 @@ public final class ClipboardSpy implements Runnable, ClipboardOwner, SecureSingl
|
||||
try {
|
||||
sleep(SLEEP);
|
||||
} catch (InterruptedException ex1) {
|
||||
Logger.getLogger(getClass().getName()).log(SEVERE, null, ex1);
|
||||
LOG.log(SEVERE, null, ex1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -200,5 +200,6 @@ public final class ClipboardSpy implements Runnable, ClipboardOwner, SecureSingl
|
||||
o.notifyClipboardChange();
|
||||
}
|
||||
}
|
||||
private static final Logger LOG = Logger.getLogger(ClipboardSpy.class.getName());
|
||||
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.tonikelope.megabasterd;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -59,4 +60,5 @@ public final class ContentType {
|
||||
public String getMIME(String ext) {
|
||||
return _content_type.get(ext);
|
||||
}
|
||||
private static final Logger LOG = Logger.getLogger(ContentType.class.getName());
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ import java.awt.event.ActionEvent;
|
||||
import java.awt.event.InputEvent;
|
||||
import java.awt.event.MouseAdapter;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.util.logging.Logger;
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.Action;
|
||||
import javax.swing.JPopupMenu;
|
||||
@ -127,4 +128,5 @@ public final class ContextMenuMouseListener extends MouseAdapter {
|
||||
private enum _Actions {
|
||||
UNDO, CUT, COPY, PASTE, SELECT_ALL
|
||||
}
|
||||
private static final Logger LOG = Logger.getLogger(ContextMenuMouseListener.class.getName());
|
||||
}
|
||||
|
@ -663,4 +663,5 @@ public final class CryptTools {
|
||||
|
||||
private CryptTools() {
|
||||
}
|
||||
private static final Logger LOG = Logger.getLogger(CryptTools.class.getName());
|
||||
}
|
||||
|
@ -514,5 +514,6 @@ public final class DBTools {
|
||||
|
||||
private DBTools() {
|
||||
}
|
||||
private static final Logger LOG = Logger.getLogger(DBTools.class.getName());
|
||||
|
||||
}
|
||||
|
@ -367,7 +367,7 @@ public final class Download implements Transference, Runnable, SecureSingleThrea
|
||||
try {
|
||||
Thread.sleep(250);
|
||||
} catch (InterruptedException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
@ -381,7 +381,7 @@ public final class Download implements Transference, Runnable, SecureSingleThrea
|
||||
try {
|
||||
Thread.sleep(250);
|
||||
} catch (InterruptedException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
@ -567,7 +567,7 @@ public final class Download implements Transference, Runnable, SecureSingleThrea
|
||||
|
||||
if (max_size != _file.length()) {
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} Downloader truncating mctemp file {1} -> {2} ", new Object[]{Thread.currentThread().getName(), _file.length(), max_size});
|
||||
LOG.log(Level.INFO, "{0} Downloader truncating mctemp file {1} -> {2} ", new Object[]{Thread.currentThread().getName(), _file.length(), max_size});
|
||||
|
||||
getView().printStatusNormal("Truncating temp file...");
|
||||
|
||||
@ -664,7 +664,7 @@ public final class Download implements Transference, Runnable, SecureSingleThrea
|
||||
|
||||
_thread_pool.shutdown();
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} Chunkdownloaders finished!", Thread.currentThread().getName());
|
||||
LOG.log(Level.INFO, "{0} Chunkdownloaders finished!", Thread.currentThread().getName());
|
||||
|
||||
getProgress_meter().setExit(true);
|
||||
|
||||
@ -672,22 +672,22 @@ public final class Download implements Transference, Runnable, SecureSingleThrea
|
||||
|
||||
try {
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} Waiting all threads to finish...", Thread.currentThread().getName());
|
||||
LOG.log(Level.INFO, "{0} Waiting all threads to finish...", Thread.currentThread().getName());
|
||||
|
||||
_thread_pool.awaitTermination(MAX_WAIT_WORKERS_SHUTDOWN, TimeUnit.SECONDS);
|
||||
|
||||
} catch (InterruptedException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
|
||||
if (!_thread_pool.isTerminated()) {
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} Closing thread pool ''mecag\u00fcen'' style...", Thread.currentThread().getName());
|
||||
LOG.log(Level.INFO, "{0} Closing thread pool ''mecag\u00fcen'' style...", Thread.currentThread().getName());
|
||||
|
||||
_thread_pool.shutdownNow();
|
||||
}
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} Downloader thread pool finished!", Thread.currentThread().getName());
|
||||
LOG.log(Level.INFO, "{0} Downloader thread pool finished!", Thread.currentThread().getName());
|
||||
|
||||
getMain_panel().getGlobal_dl_speed().detachTransference(this);
|
||||
|
||||
@ -850,10 +850,10 @@ public final class Download implements Transference, Runnable, SecureSingleThrea
|
||||
|
||||
_status_error = true;
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
|
||||
if (_file != null && !getView().isKeepTempFileSelected()) {
|
||||
@ -882,7 +882,7 @@ public final class Download implements Transference, Runnable, SecureSingleThrea
|
||||
try {
|
||||
deleteDownload(_url);
|
||||
} catch (SQLException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(SEVERE, null, ex);
|
||||
LOG.log(SEVERE, null, ex);
|
||||
}
|
||||
|
||||
}
|
||||
@ -922,7 +922,7 @@ public final class Download implements Transference, Runnable, SecureSingleThrea
|
||||
}
|
||||
});
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0}{1} Downloader: bye bye", new Object[]{Thread.currentThread().getName(), _file_name});
|
||||
LOG.log(Level.INFO, "{0}{1} Downloader: bye bye", new Object[]{Thread.currentThread().getName(), _file_name});
|
||||
}
|
||||
|
||||
public void provisionIt(boolean retry) throws APIException {
|
||||
@ -971,7 +971,7 @@ public final class Download implements Transference, Runnable, SecureSingleThrea
|
||||
|
||||
} catch (SQLException ex) {
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(SEVERE, null, ex);
|
||||
LOG.log(SEVERE, null, ex);
|
||||
|
||||
_status_error_message = "Error registering download: file is already downloading.";
|
||||
}
|
||||
@ -1162,7 +1162,7 @@ public final class Download implements Transference, Runnable, SecureSingleThrea
|
||||
try {
|
||||
Thread.sleep(getWaitTimeExpBackOff(conta_error++) * 1000);
|
||||
} catch (InterruptedException ex2) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex2);
|
||||
LOG.log(Level.SEVERE, null, ex2);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1190,7 +1190,7 @@ public final class Download implements Transference, Runnable, SecureSingleThrea
|
||||
_thread_pool.execute(c);
|
||||
|
||||
} catch (java.util.concurrent.RejectedExecutionException e) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, e.getMessage());
|
||||
LOG.log(Level.INFO, e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1662,7 +1662,7 @@ public final class Download implements Transference, Runnable, SecureSingleThrea
|
||||
_secure_notify_lock.wait();
|
||||
} catch (InterruptedException ex) {
|
||||
_exit = true;
|
||||
Logger.getLogger(getClass().getName()).log(SEVERE, null, ex);
|
||||
LOG.log(SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1724,4 +1724,5 @@ public final class Download implements Transference, Runnable, SecureSingleThrea
|
||||
public void downWaitQueue() {
|
||||
_main_panel.getDownload_manager().downWaitQueue(this);
|
||||
}
|
||||
private static final Logger LOG = Logger.getLogger(Download.class.getName());
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ public final class DownloadManager extends TransferenceManager {
|
||||
try {
|
||||
deleteDownloads(delete_down.toArray(new String[delete_down.size()]));
|
||||
} catch (SQLException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(SEVERE, null, ex);
|
||||
LOG.log(SEVERE, null, ex);
|
||||
}
|
||||
|
||||
secureNotify();
|
||||
@ -83,7 +83,7 @@ public final class DownloadManager extends TransferenceManager {
|
||||
|
||||
} catch (APIException ex) {
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} Provision failed! Retrying in separated thread...", Thread.currentThread().getName());
|
||||
LOG.log(Level.INFO, "{0} Provision failed! Retrying in separated thread...", Thread.currentThread().getName());
|
||||
|
||||
THREAD_POOL.execute(new Runnable() {
|
||||
@Override
|
||||
@ -95,7 +95,7 @@ public final class DownloadManager extends TransferenceManager {
|
||||
|
||||
} catch (APIException ex1) {
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(SEVERE, null, ex1);
|
||||
LOG.log(SEVERE, null, ex1);
|
||||
}
|
||||
|
||||
secureNotify();
|
||||
@ -149,5 +149,6 @@ public final class DownloadManager extends TransferenceManager {
|
||||
getTransference_finished_queue().add(download);
|
||||
}
|
||||
}
|
||||
private static final Logger LOG = Logger.getLogger(DownloadManager.class.getName());
|
||||
|
||||
}
|
||||
|
@ -428,7 +428,7 @@ public final class DownloadView extends javax.swing.JPanel implements Transferen
|
||||
try {
|
||||
Desktop.getDesktop().open(new File(_download.getDownload_path() + "/" + _download.getFile_name()).getParentFile());
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, ex.getMessage());
|
||||
LOG.log(Level.INFO, ex.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@ -471,7 +471,14 @@ public final class DownloadView extends javax.swing.JPanel implements Transferen
|
||||
|
||||
_download.downWaitQueue();
|
||||
|
||||
queue_down_button.setEnabled(true);
|
||||
swingInvoke(
|
||||
new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
queue_down_button.setEnabled(true);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
@ -718,5 +725,6 @@ public final class DownloadView extends javax.swing.JPanel implements Transferen
|
||||
private javax.swing.JLabel status_label;
|
||||
private javax.swing.JButton stop_button;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
private static final Logger LOG = Logger.getLogger(DownloadView.class.getName());
|
||||
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ import java.awt.Dialog;
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Enumeration;
|
||||
import java.util.logging.Logger;
|
||||
import javax.swing.JCheckBox;
|
||||
import javax.swing.JComboBox;
|
||||
import javax.swing.JComponent;
|
||||
@ -842,4 +843,5 @@ public final class FileGrabberDialog extends javax.swing.JDialog {
|
||||
private javax.swing.JLabel used_space_label;
|
||||
private javax.swing.JLabel warning_label;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
private static final Logger LOG = Logger.getLogger(FileGrabberDialog.class.getName());
|
||||
}
|
||||
|
@ -16,6 +16,7 @@
|
||||
*/
|
||||
package com.tonikelope.megabasterd;
|
||||
|
||||
import static com.tonikelope.megabasterd.MainPanel.GUI_FONT;
|
||||
import static com.tonikelope.megabasterd.MainPanel.THREAD_POOL;
|
||||
import static com.tonikelope.megabasterd.MiscTools.swingInvoke;
|
||||
import static com.tonikelope.megabasterd.MiscTools.translateLabels;
|
||||
@ -35,7 +36,6 @@ import java.util.logging.Logger;
|
||||
import javax.swing.JFileChooser;
|
||||
import javax.swing.JOptionPane;
|
||||
import static javax.swing.WindowConstants.DISPOSE_ON_CLOSE;
|
||||
import static com.tonikelope.megabasterd.MainPanel.GUI_FONT;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -456,4 +456,5 @@ public class FileMergerDialog extends javax.swing.JDialog {
|
||||
private javax.swing.JButton output_button;
|
||||
private javax.swing.JLabel output_folder_label;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
private static final Logger LOG = Logger.getLogger(FileMergerDialog.class.getName());
|
||||
}
|
||||
|
@ -449,4 +449,5 @@ public class FileSplitterDialog extends javax.swing.JDialog {
|
||||
private javax.swing.JLabel split_size_label;
|
||||
private javax.swing.JTextField split_size_text;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
private static final Logger LOG = Logger.getLogger(FileSplitterDialog.class.getName());
|
||||
}
|
||||
|
@ -424,7 +424,7 @@ public final class FolderLinkDialog extends javax.swing.JDialog {
|
||||
|
||||
} catch (Exception ex) {
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(SEVERE, null, ex);
|
||||
LOG.log(SEVERE, null, ex);
|
||||
|
||||
_mega_error = true;
|
||||
}
|
||||
@ -518,4 +518,5 @@ public final class FolderLinkDialog extends javax.swing.JDialog {
|
||||
private javax.swing.JLabel total_space_label;
|
||||
private javax.swing.JLabel warning_label;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
private static final Logger LOG = Logger.getLogger(FolderLinkDialog.class.getName());
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package com.tonikelope.megabasterd;
|
||||
import static com.tonikelope.megabasterd.MainPanel.*;
|
||||
import static com.tonikelope.megabasterd.MiscTools.*;
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -203,4 +204,5 @@ public class Get2FACode extends javax.swing.JDialog {
|
||||
private javax.swing.JLabel please_label;
|
||||
private javax.swing.JLabel status_label;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
private static final Logger LOG = Logger.getLogger(Get2FACode.class.getName());
|
||||
}
|
||||
|
@ -242,7 +242,7 @@ public class GetMasterPasswordDialog extends javax.swing.JDialog {
|
||||
});
|
||||
|
||||
} catch (HeadlessException | NoSuchAlgorithmException | InvalidKeySpecException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
|
||||
}
|
||||
@ -267,4 +267,5 @@ public class GetMasterPasswordDialog extends javax.swing.JDialog {
|
||||
private javax.swing.JCheckBox remember_checkbox;
|
||||
private javax.swing.JLabel status_label;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
private static final Logger LOG = Logger.getLogger(GetMasterPasswordDialog.class.getName());
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ public final class KissVideoStreamServer implements HttpHandler, SecureSingleThr
|
||||
try {
|
||||
_secure_notify_lock.wait();
|
||||
} catch (InterruptedException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(SEVERE, null, ex);
|
||||
LOG.log(SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
@ -165,12 +165,12 @@ public final class KissVideoStreamServer implements HttpHandler, SecureSingleThr
|
||||
|
||||
error = true;
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex.getMessage());
|
||||
LOG.log(Level.SEVERE, null, ex.getMessage());
|
||||
|
||||
try {
|
||||
Thread.sleep(getWaitTimeExpBackOff(conta_error++) * 1000);
|
||||
} catch (InterruptedException ex2) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex2);
|
||||
LOG.log(Level.SEVERE, null, ex2);
|
||||
}
|
||||
|
||||
}
|
||||
@ -210,12 +210,12 @@ public final class KissVideoStreamServer implements HttpHandler, SecureSingleThr
|
||||
|
||||
error = true;
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex.getMessage());
|
||||
LOG.log(Level.SEVERE, null, ex.getMessage());
|
||||
|
||||
try {
|
||||
Thread.sleep(getWaitTimeExpBackOff(conta_error++) * 1000);
|
||||
} catch (InterruptedException ex2) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex2);
|
||||
LOG.log(Level.SEVERE, null, ex2);
|
||||
}
|
||||
|
||||
}
|
||||
@ -286,7 +286,7 @@ public final class KissVideoStreamServer implements HttpHandler, SecureSingleThr
|
||||
|
||||
link = url_parts[1];
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} {1} {2}", new Object[]{Thread.currentThread().getName(), link, mega_account});
|
||||
LOG.log(Level.INFO, "{0} {1} {2}", new Object[]{Thread.currentThread().getName(), link, mega_account});
|
||||
|
||||
HashMap cache_info, file_info;
|
||||
|
||||
@ -459,11 +459,11 @@ public final class KissVideoStreamServer implements HttpHandler, SecureSingleThr
|
||||
} catch (Exception ex) {
|
||||
|
||||
if (!(ex instanceof IOException)) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
|
||||
} finally {
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} KissVideoStreamerHandle: bye bye", Thread.currentThread().getName());
|
||||
LOG.log(Level.INFO, "{0} KissVideoStreamerHandle: bye bye", Thread.currentThread().getName());
|
||||
|
||||
if (chunkwriter != null) {
|
||||
|
||||
@ -484,4 +484,5 @@ public final class KissVideoStreamServer implements HttpHandler, SecureSingleThr
|
||||
|
||||
_updateStatus(THREAD_STOP);
|
||||
}
|
||||
private static final Logger LOG = Logger.getLogger(KissVideoStreamServer.class.getName());
|
||||
}
|
||||
|
@ -289,4 +289,5 @@ public final class LabelTranslatorSingleton {
|
||||
|
||||
private static final LabelTranslatorSingleton INSTANCE = new LabelTranslatorSingleton();
|
||||
}
|
||||
private static final Logger LOG = Logger.getLogger(LabelTranslatorSingleton.class.getName());
|
||||
}
|
||||
|
@ -365,9 +365,9 @@ public final class LinkGrabberDialog extends javax.swing.JDialog implements Clip
|
||||
}
|
||||
|
||||
} catch (FileNotFoundException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
|
||||
swingInvoke(new Runnable() {
|
||||
@ -494,4 +494,5 @@ public final class LinkGrabberDialog extends javax.swing.JDialog implements Clip
|
||||
}
|
||||
});
|
||||
}
|
||||
private static final Logger LOG = Logger.getLogger(LinkGrabberDialog.class.getName());
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ import javax.swing.UIManager;
|
||||
*/
|
||||
public final class MainPanel {
|
||||
|
||||
public static final String VERSION = "6.28";
|
||||
public static final String VERSION = "6.29";
|
||||
public static final int THROTTLE_SLICE_SIZE = 16 * 1024;
|
||||
public static final int DEFAULT_BYTE_BUFFER_SIZE = 16 * 1024;
|
||||
public static final int STREAMER_PORT = 1337;
|
||||
@ -290,7 +290,7 @@ public final class MainPanel {
|
||||
|
||||
timer_lock.wait();
|
||||
} catch (InterruptedException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1346,5 +1346,6 @@ public final class MainPanel {
|
||||
});
|
||||
|
||||
}
|
||||
private static final Logger LOG = Logger.getLogger(MainPanel.class.getName());
|
||||
|
||||
}
|
||||
|
@ -702,7 +702,7 @@ public final class MainPanelView extends javax.swing.JFrame {
|
||||
urls.add(decryptMegaDownloaderLink(link));
|
||||
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(getClass().getName()).log(SEVERE, null, ex);
|
||||
LOG.log(SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
@ -715,7 +715,7 @@ public final class MainPanelView extends javax.swing.JFrame {
|
||||
urls.addAll(CryptTools.decryptELC(link, getMain_panel()));
|
||||
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(getClass().getName()).log(SEVERE, null, ex);
|
||||
LOG.log(SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
@ -825,7 +825,7 @@ public final class MainPanelView extends javax.swing.JFrame {
|
||||
getMain_panel().getDownload_manager().secureNotify();
|
||||
|
||||
} catch (UnsupportedEncodingException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
} catch (InterruptedException ex) {
|
||||
Logger.getLogger(MainPanelView.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
@ -866,7 +866,7 @@ public final class MainPanelView extends javax.swing.JFrame {
|
||||
try {
|
||||
deleteMegaAccount(email);
|
||||
} catch (SQLException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(SEVERE, null, ex);
|
||||
LOG.log(SEVERE, null, ex);
|
||||
}
|
||||
|
||||
_main_panel.getMega_accounts().remove(email);
|
||||
@ -879,7 +879,7 @@ public final class MainPanelView extends javax.swing.JFrame {
|
||||
try {
|
||||
deleteELCAccount(host);
|
||||
} catch (SQLException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(SEVERE, null, ex);
|
||||
LOG.log(SEVERE, null, ex);
|
||||
}
|
||||
|
||||
_main_panel.getElc_accounts().remove(host);
|
||||
@ -944,7 +944,7 @@ public final class MainPanelView extends javax.swing.JFrame {
|
||||
THREAD_POOL.execute(_main_panel.getMega_proxy_server());
|
||||
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
@ -955,7 +955,7 @@ public final class MainPanelView extends javax.swing.JFrame {
|
||||
try {
|
||||
_main_panel.getMega_proxy_server().stopServer();
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1089,7 +1089,7 @@ public final class MainPanelView extends javax.swing.JFrame {
|
||||
|
||||
String parent_node = (String) ((Map) ((List) res.get("f")).get(0)).get("h");
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} Dir {1} created", new Object[]{Thread.currentThread().getName(), parent_node});
|
||||
LOG.log(Level.INFO, "{0} Dir {1} created", new Object[]{Thread.currentThread().getName(), parent_node});
|
||||
|
||||
ma.shareFolder(parent_node, parent_key, share_key);
|
||||
|
||||
@ -1171,7 +1171,7 @@ public final class MainPanelView extends javax.swing.JFrame {
|
||||
|
||||
} catch (Exception ex) {
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(SEVERE, null, ex);
|
||||
LOG.log(SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1322,5 +1322,6 @@ public final class MainPanelView extends javax.swing.JFrame {
|
||||
private javax.swing.JLabel up_remtime_label;
|
||||
private javax.swing.JPanel uploads_panel;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
private static final Logger LOG = Logger.getLogger(MainPanelView.class.getName());
|
||||
|
||||
}
|
||||
|
@ -298,7 +298,7 @@ public final class MegaAPI implements Serializable {
|
||||
|
||||
} catch (Exception ex) {
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
|
||||
return quota;
|
||||
@ -343,7 +343,7 @@ public final class MegaAPI implements Serializable {
|
||||
}
|
||||
|
||||
} catch (IOException | MegaAPIException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
|
||||
}
|
||||
@ -431,9 +431,9 @@ public final class MegaAPI implements Serializable {
|
||||
|
||||
if (http_status != 200) {
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.WARNING, "{0} {1} {2}", new Object[]{Thread.currentThread().getName(), request, url_api.toString()});
|
||||
LOG.log(Level.WARNING, "{0} {1} {2}", new Object[]{Thread.currentThread().getName(), request, url_api.toString()});
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.WARNING, "{0} Failed : HTTP error code : {1}", new Object[]{Thread.currentThread().getName(), http_status});
|
||||
LOG.log(Level.WARNING, "{0} Failed : HTTP error code : {1}", new Object[]{Thread.currentThread().getName(), http_status});
|
||||
|
||||
http_error = http_status;
|
||||
|
||||
@ -482,12 +482,12 @@ public final class MegaAPI implements Serializable {
|
||||
throw new MegaAPIException(mega_error);
|
||||
}
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.WARNING, "{0} MegaAPI ERROR {1} Waiting for retry...", new Object[]{Thread.currentThread().getName(), String.valueOf(mega_error)});
|
||||
LOG.log(Level.WARNING, "{0} MegaAPI ERROR {1} Waiting for retry...", new Object[]{Thread.currentThread().getName(), String.valueOf(mega_error)});
|
||||
|
||||
try {
|
||||
Thread.sleep(getWaitTimeExpBackOff(conta_error++) * 1000);
|
||||
} catch (InterruptedException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
|
||||
} else if (!empty_response && mega_error == 0 && http_error == 0) {
|
||||
@ -606,7 +606,7 @@ public final class MegaAPI implements Serializable {
|
||||
ret = aes_cbc_encrypt_nopadding(new_attr_byte, key, AES_ZERO_IV);
|
||||
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
|
||||
return ret;
|
||||
@ -631,7 +631,7 @@ public final class MegaAPI implements Serializable {
|
||||
res_map = objectMapper.readValue(att, HashMap.class);
|
||||
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
|
||||
}
|
||||
|
||||
@ -659,7 +659,7 @@ public final class MegaAPI implements Serializable {
|
||||
ul_url = (String) res_map[0].get("p");
|
||||
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
|
||||
return ul_url;
|
||||
@ -684,7 +684,7 @@ public final class MegaAPI implements Serializable {
|
||||
res_map = objectMapper.readValue(res, HashMap[].class);
|
||||
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
|
||||
return res_map != null ? res_map[0] : null;
|
||||
@ -737,7 +737,7 @@ public final class MegaAPI implements Serializable {
|
||||
res_map = objectMapper.readValue(res, HashMap[].class);
|
||||
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
|
||||
return res_map != null ? res_map[0] : null;
|
||||
@ -767,7 +767,7 @@ public final class MegaAPI implements Serializable {
|
||||
res_map = objectMapper.readValue(res, HashMap[].class);
|
||||
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
|
||||
return res_map != null ? res_map[0] : null;
|
||||
@ -799,7 +799,7 @@ public final class MegaAPI implements Serializable {
|
||||
public_link = "https://mega.nz/#!" + file_id + "!" + Bin2UrlBASE64(node_key);
|
||||
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
|
||||
return public_link;
|
||||
@ -830,7 +830,7 @@ public final class MegaAPI implements Serializable {
|
||||
public_link = "https://mega.nz/#F!" + folder_id + "!" + Bin2UrlBASE64(node_key);
|
||||
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
|
||||
return public_link;
|
||||
@ -868,7 +868,7 @@ public final class MegaAPI implements Serializable {
|
||||
return _rawRequest(request, url_api);
|
||||
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
|
||||
return null;
|
||||
@ -883,7 +883,7 @@ public final class MegaAPI implements Serializable {
|
||||
ch = Bin2UrlBASE64(encryptKey((h + h).getBytes(), i32a2bin(getMaster_key())));
|
||||
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
|
||||
return ch;
|
||||
@ -966,10 +966,11 @@ public final class MegaAPI implements Serializable {
|
||||
}
|
||||
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
private static final Logger LOG = Logger.getLogger(MegaAPI.class.getName());
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,7 @@
|
||||
package com.tonikelope.megabasterd;
|
||||
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author tonikelope
|
||||
@ -10,4 +12,5 @@ public class MegaAPIException extends APIException {
|
||||
super(code, "MEGA API ERROR: " + String.valueOf(code));
|
||||
_code = code;
|
||||
}
|
||||
private static final Logger LOG = Logger.getLogger(MegaAPIException.class.getName());
|
||||
}
|
||||
|
@ -327,4 +327,5 @@ public final class MegaCrypterAPI {
|
||||
|
||||
private MegaCrypterAPI() {
|
||||
}
|
||||
private static final Logger LOG = Logger.getLogger(MegaCrypterAPI.class.getName());
|
||||
}
|
||||
|
@ -1,5 +1,7 @@
|
||||
package com.tonikelope.megabasterd;
|
||||
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author tonikelope
|
||||
@ -10,4 +12,5 @@ public class MegaCrypterAPIException extends APIException {
|
||||
super(code, "MEGACRYPTER API ERROR: " + String.valueOf(code));
|
||||
_code = code;
|
||||
}
|
||||
private static final Logger LOG = Logger.getLogger(MegaCrypterAPIException.class.getName());
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.tonikelope.megabasterd;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -26,5 +27,6 @@ public final class MegaDirNode {
|
||||
public HashMap<String, MegaDirNode> getChildren() {
|
||||
return _children;
|
||||
}
|
||||
private static final Logger LOG = Logger.getLogger(MegaDirNode.class.getName());
|
||||
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ import static com.tonikelope.megabasterd.MiscTools.*;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.logging.Logger;
|
||||
import javax.swing.tree.DefaultMutableTreeNode;
|
||||
import javax.swing.tree.MutableTreeNode;
|
||||
|
||||
@ -63,5 +64,6 @@ public class MegaMutableTreeNode extends DefaultMutableTreeNode {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
private static final Logger LOG = Logger.getLogger(MegaMutableTreeNode.class.getName());
|
||||
|
||||
}
|
||||
|
@ -65,14 +65,14 @@ public class MegaProxyServer implements Runnable {
|
||||
}
|
||||
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
} finally {
|
||||
|
||||
if (!_serverSocket.isClosed()) {
|
||||
try {
|
||||
_serverSocket.close();
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -131,7 +131,7 @@ public class MegaProxyServer implements Runnable {
|
||||
try {
|
||||
String request = readLine(_clientSocket);
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, request);
|
||||
LOG.log(Level.INFO, request);
|
||||
|
||||
Matcher matcher = CONNECT_PATTERN.matcher(request);
|
||||
|
||||
@ -153,7 +153,7 @@ public class MegaProxyServer implements Runnable {
|
||||
|
||||
}
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, header);
|
||||
LOG.log(Level.INFO, header);
|
||||
|
||||
} while (!"".equals(header));
|
||||
|
||||
@ -266,4 +266,5 @@ public class MegaProxyServer implements Runnable {
|
||||
return byteArrayOutputStream.toString("UTF-8");
|
||||
}
|
||||
}
|
||||
private static final Logger LOG = Logger.getLogger(MegaProxyServer.class.getName());
|
||||
}
|
||||
|
@ -1286,5 +1286,6 @@ public final class MiscTools {
|
||||
|
||||
private MiscTools() {
|
||||
}
|
||||
private static final Logger LOG = Logger.getLogger(MiscTools.class.getName());
|
||||
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ public final class ProgressMeter implements Runnable, SecureSingleThreadNotifiab
|
||||
_secure_notify_lock.wait();
|
||||
} catch (InterruptedException ex) {
|
||||
_exit = true;
|
||||
Logger.getLogger(getClass().getName()).log(SEVERE, null, ex);
|
||||
LOG.log(SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
@ -58,7 +58,7 @@ public final class ProgressMeter implements Runnable, SecureSingleThreadNotifiab
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} ProgressMeter hello!", Thread.currentThread().getName());
|
||||
LOG.log(Level.INFO, "{0} ProgressMeter hello!", Thread.currentThread().getName());
|
||||
|
||||
_progress = _transference.getProgress();
|
||||
|
||||
@ -76,5 +76,6 @@ public final class ProgressMeter implements Runnable, SecureSingleThreadNotifiab
|
||||
}
|
||||
|
||||
}
|
||||
private static final Logger LOG = Logger.getLogger(ProgressMeter.class.getName());
|
||||
|
||||
}
|
||||
|
@ -272,7 +272,7 @@ public class SetMasterPasswordDialog extends javax.swing.JDialog {
|
||||
}
|
||||
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -297,4 +297,5 @@ public class SetMasterPasswordDialog extends javax.swing.JDialog {
|
||||
private javax.swing.JLabel status_label;
|
||||
private javax.swing.JLabel warning_label;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
private static final Logger LOG = Logger.getLogger(SetMasterPasswordDialog.class.getName());
|
||||
}
|
||||
|
@ -391,9 +391,9 @@ public final class SettingsDialog extends javax.swing.JDialog {
|
||||
pass = new String(CryptTools.aes_cbc_decrypt_pkcs7(BASE642Bin((String) data.get("password")), _main_panel.getMaster_pass(), CryptTools.AES_ZERO_IV));
|
||||
|
||||
} catch (NoSuchAlgorithmException | NoSuchPaddingException | InvalidKeyException | InvalidAlgorithmParameterException | IllegalBlockSizeException | BadPaddingException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
|
||||
String[] new_row_data = {(String) pair.getKey(), pass};
|
||||
@ -414,9 +414,9 @@ public final class SettingsDialog extends javax.swing.JDialog {
|
||||
apikey = new String(CryptTools.aes_cbc_decrypt_pkcs7(BASE642Bin((String) data.get("apikey")), _main_panel.getMaster_pass(), CryptTools.AES_ZERO_IV));
|
||||
|
||||
} catch (NoSuchAlgorithmException | NoSuchPaddingException | InvalidKeyException | InvalidAlgorithmParameterException | IllegalBlockSizeException | BadPaddingException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
|
||||
String[] new_row_data = {(String) pair.getKey(), user, apikey};
|
||||
@ -1769,7 +1769,7 @@ public final class SettingsDialog extends javax.swing.JDialog {
|
||||
apikey = new String(CryptTools.aes_cbc_decrypt_pkcs7(BASE642Bin(apikey), _main_panel.getMaster_pass(), CryptTools.AES_ZERO_IV));
|
||||
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1908,7 +1908,7 @@ public final class SettingsDialog extends javax.swing.JDialog {
|
||||
} catch (Exception ex) {
|
||||
|
||||
email_error.add(email);
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
|
||||
} else {
|
||||
@ -1924,7 +1924,7 @@ public final class SettingsDialog extends javax.swing.JDialog {
|
||||
password = new String(CryptTools.aes_cbc_decrypt_pkcs7(BASE642Bin(password), _main_panel.getMaster_pass(), CryptTools.AES_ZERO_IV));
|
||||
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1995,7 +1995,7 @@ public final class SettingsDialog extends javax.swing.JDialog {
|
||||
} catch (Exception ex) {
|
||||
|
||||
email_error.add(email);
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
|
||||
}
|
||||
}
|
||||
@ -2080,11 +2080,11 @@ public final class SettingsDialog extends javax.swing.JDialog {
|
||||
}
|
||||
|
||||
} catch (SQLException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
} catch (NoSuchAlgorithmException | NoSuchPaddingException | InvalidKeyException | InvalidAlgorithmParameterException | IllegalBlockSizeException | BadPaddingException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}//GEN-LAST:event_save_buttonActionPerformed
|
||||
|
||||
@ -2144,11 +2144,11 @@ public final class SettingsDialog extends javax.swing.JDialog {
|
||||
setVisible(false);
|
||||
|
||||
} catch (SQLException | ClassNotFoundException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2202,11 +2202,11 @@ public final class SettingsDialog extends javax.swing.JDialog {
|
||||
setVisible(false);
|
||||
|
||||
} catch (SQLException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2308,9 +2308,9 @@ public final class SettingsDialog extends javax.swing.JDialog {
|
||||
pass = new String(CryptTools.aes_cbc_decrypt_pkcs7(BASE642Bin((String) data.get("password")), _main_panel.getMaster_pass(), CryptTools.AES_ZERO_IV));
|
||||
|
||||
} catch (NoSuchAlgorithmException | NoSuchPaddingException | InvalidKeyException | InvalidAlgorithmParameterException | IllegalBlockSizeException | BadPaddingException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
|
||||
String[] new_row_data = {(String) pair.getKey(), pass};
|
||||
@ -2331,9 +2331,9 @@ public final class SettingsDialog extends javax.swing.JDialog {
|
||||
apikey = new String(CryptTools.aes_cbc_decrypt_pkcs7(BASE642Bin((String) data.get("apikey")), _main_panel.getMaster_pass(), CryptTools.AES_ZERO_IV));
|
||||
|
||||
} catch (NoSuchAlgorithmException | NoSuchPaddingException | InvalidKeyException | InvalidAlgorithmParameterException | IllegalBlockSizeException | BadPaddingException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
|
||||
String[] new_row_data = {(String) pair.getKey(), user, apikey};
|
||||
@ -2419,7 +2419,7 @@ public final class SettingsDialog extends javax.swing.JDialog {
|
||||
setVisible(false);
|
||||
|
||||
} catch (SQLException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
}//GEN-LAST:event_delete_all_accounts_buttonActionPerformed
|
||||
@ -2554,7 +2554,7 @@ public final class SettingsDialog extends javax.swing.JDialog {
|
||||
}
|
||||
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
|
||||
}
|
||||
@ -2876,4 +2876,5 @@ public final class SettingsDialog extends javax.swing.JDialog {
|
||||
private javax.swing.JLabel zoom_label;
|
||||
private javax.swing.JSpinner zoom_spinner;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
private static final Logger LOG = Logger.getLogger(SettingsDialog.class.getName());
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ public final class SmartMegaProxyManager {
|
||||
}
|
||||
}
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.WARNING, "{0} Smart Proxy Manager: NO PROXYS AVAILABLE!!", new Object[]{Thread.currentThread().getName()});
|
||||
LOG.log(Level.WARNING, "{0} Smart Proxy Manager: NO PROXYS AVAILABLE!!", new Object[]{Thread.currentThread().getName()});
|
||||
|
||||
refreshProxyList();
|
||||
|
||||
@ -125,13 +125,13 @@ public final class SmartMegaProxyManager {
|
||||
}
|
||||
});
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} Smart Proxy Manager: proxy list refreshed ({1})", new Object[]{Thread.currentThread().getName(), _proxy_list.size()});
|
||||
LOG.log(Level.INFO, "{0} Smart Proxy Manager: proxy list refreshed ({1})", new Object[]{Thread.currentThread().getName(), _proxy_list.size()});
|
||||
}
|
||||
|
||||
} catch (MalformedURLException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
} finally {
|
||||
if (con != null) {
|
||||
con.disconnect();
|
||||
@ -139,5 +139,6 @@ public final class SmartMegaProxyManager {
|
||||
|
||||
}
|
||||
}
|
||||
private static final Logger LOG = Logger.getLogger(SmartMegaProxyManager.class.getName());
|
||||
|
||||
}
|
||||
|
@ -236,9 +236,10 @@ public final class SpeedMeter implements Runnable {
|
||||
Thread.sleep(SLEEP);
|
||||
|
||||
} catch (InterruptedException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
|
||||
} while (true);
|
||||
}
|
||||
private static final Logger LOG = Logger.getLogger(SpeedMeter.class.getName());
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ public final class SqliteSingleton {
|
||||
}
|
||||
|
||||
} catch (ClassNotFoundException | SQLException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
|
||||
return conn;
|
||||
@ -59,5 +59,6 @@ public final class SqliteSingleton {
|
||||
|
||||
private static final SqliteSingleton INSTANCE = new SqliteSingleton();
|
||||
}
|
||||
private static final Logger LOG = Logger.getLogger(SqliteSingleton.class.getName());
|
||||
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package com.tonikelope.megabasterd;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -71,5 +72,6 @@ public final class StreamChunk {
|
||||
return new ByteArrayInputStream(this.buf, 0, this.count);
|
||||
}
|
||||
}
|
||||
private static final Logger LOG = Logger.getLogger(StreamChunk.class.getName());
|
||||
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ public class StreamChunkDownloader implements Runnable {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} Worker [{1}]: let''s do some work!", new Object[]{Thread.currentThread().getName(), _id});
|
||||
LOG.log(Level.INFO, "{0} Worker [{1}]: let''s do some work!", new Object[]{Thread.currentThread().getName(), _id});
|
||||
|
||||
HttpURLConnection con = null;
|
||||
|
||||
@ -54,7 +54,7 @@ public class StreamChunkDownloader implements Runnable {
|
||||
|
||||
while (!_exit && !_chunkmanager.isExit() && _chunkmanager.getChunk_queue().size() >= StreamChunkManager.BUFFER_CHUNKS_SIZE) {
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} Worker [{1}]: Chunk buffer is full. I pause myself.", new Object[]{Thread.currentThread().getName(), _id});
|
||||
LOG.log(Level.INFO, "{0} Worker [{1}]: Chunk buffer is full. I pause myself.", new Object[]{Thread.currentThread().getName(), _id});
|
||||
|
||||
_chunkmanager.secureWait();
|
||||
}
|
||||
@ -138,7 +138,7 @@ public class StreamChunkDownloader implements Runnable {
|
||||
|
||||
byte[] buffer = new byte[DEFAULT_BYTE_BUFFER_SIZE];
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} Worker [{1}]: offset: {2} size: {3}", new Object[]{Thread.currentThread().getName(), _id, offset, chunk_stream.getSize()});
|
||||
LOG.log(Level.INFO, "{0} Worker [{1}]: offset: {2} size: {3}", new Object[]{Thread.currentThread().getName(), _id, offset, chunk_stream.getSize()});
|
||||
|
||||
http_error = 0;
|
||||
|
||||
@ -150,7 +150,7 @@ public class StreamChunkDownloader implements Runnable {
|
||||
|
||||
if (http_status != 200) {
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} Failed : HTTP error code : {1}", new Object[]{Thread.currentThread().getName(), http_status});
|
||||
LOG.log(Level.INFO, "{0} Failed : HTTP error code : {1}", new Object[]{Thread.currentThread().getName(), http_status});
|
||||
|
||||
http_error = http_status;
|
||||
|
||||
@ -169,7 +169,7 @@ public class StreamChunkDownloader implements Runnable {
|
||||
|
||||
if (chunk_stream.getSize() == chunk_writes) {
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} Worker [{1}] has downloaded chunk [{2}]!", new Object[]{Thread.currentThread().getName(), _id, chunk_stream.getOffset()});
|
||||
LOG.log(Level.INFO, "{0} Worker [{1}] has downloaded chunk [{2}]!", new Object[]{Thread.currentThread().getName(), _id, chunk_stream.getOffset()});
|
||||
|
||||
_chunkmanager.getChunk_queue().put(chunk_stream.getOffset(), chunk_stream);
|
||||
|
||||
@ -180,7 +180,7 @@ public class StreamChunkDownloader implements Runnable {
|
||||
}
|
||||
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
} finally {
|
||||
con.disconnect();
|
||||
}
|
||||
@ -192,14 +192,15 @@ public class StreamChunkDownloader implements Runnable {
|
||||
}
|
||||
|
||||
} catch (IOException | URISyntaxException | ChunkInvalidException | InterruptedException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
} catch (OutOfMemoryError | Exception ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
|
||||
_chunkmanager.secureNotifyAll();
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} Worker [{1}]: bye bye", new Object[]{Thread.currentThread().getName(), _id});
|
||||
LOG.log(Level.INFO, "{0} Worker [{1}]: bye bye", new Object[]{Thread.currentThread().getName(), _id});
|
||||
}
|
||||
private static final Logger LOG = Logger.getLogger(StreamChunkDownloader.class.getName());
|
||||
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ public class StreamChunkManager implements Runnable, SecureMultiThreadNotifiable
|
||||
|
||||
try {
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} StreamChunkManager: let''s do some work! Start: {1} End: {2}", new Object[]{Thread.currentThread().getName(), _start_offset, _end_offset});
|
||||
LOG.log(Level.INFO, "{0} StreamChunkManager: let''s do some work! Start: {1} End: {2}", new Object[]{Thread.currentThread().getName(), _start_offset, _end_offset});
|
||||
|
||||
while (!_exit && _bytes_written < _end_offset) {
|
||||
|
||||
@ -104,13 +104,13 @@ public class StreamChunkManager implements Runnable, SecureMultiThreadNotifiable
|
||||
|
||||
secureNotifyAll();
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} StreamChunkManager has written {1} / {2} ...", new Object[]{Thread.currentThread().getName(), _bytes_written, _end_offset});
|
||||
LOG.log(Level.INFO, "{0} StreamChunkManager has written {1} / {2} ...", new Object[]{Thread.currentThread().getName(), _bytes_written, _end_offset});
|
||||
|
||||
}
|
||||
|
||||
if (!_exit && _bytes_written < _end_offset) {
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} StreamChunkManager waiting for offset {1}...", new Object[]{Thread.currentThread().getName(), _bytes_written});
|
||||
LOG.log(Level.INFO, "{0} StreamChunkManager waiting for offset {1}...", new Object[]{Thread.currentThread().getName(), _bytes_written});
|
||||
|
||||
secureWait();
|
||||
}
|
||||
@ -118,20 +118,20 @@ public class StreamChunkManager implements Runnable, SecureMultiThreadNotifiable
|
||||
|
||||
} catch (Exception ex) {
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
|
||||
try {
|
||||
_pipeos.close();
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
|
||||
_exit = true;
|
||||
|
||||
secureNotifyAll();
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} StreamChunkManager: bye bye", Thread.currentThread().getName());
|
||||
LOG.log(Level.INFO, "{0} StreamChunkManager: bye bye", Thread.currentThread().getName());
|
||||
}
|
||||
|
||||
public long nextOffset() {
|
||||
@ -172,7 +172,7 @@ public class StreamChunkManager implements Runnable, SecureMultiThreadNotifiable
|
||||
try {
|
||||
_secure_notify_lock.wait();
|
||||
} catch (InterruptedException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
@ -193,5 +193,6 @@ public class StreamChunkManager implements Runnable, SecureMultiThreadNotifiable
|
||||
_secure_notify_lock.notifyAll();
|
||||
}
|
||||
}
|
||||
private static final Logger LOG = Logger.getLogger(StreamChunkManager.class.getName());
|
||||
|
||||
}
|
||||
|
@ -97,7 +97,7 @@ public final class StreamThrottlerSupervisor implements Runnable, SecureMultiThr
|
||||
try {
|
||||
_secure_notify_lock.wait();
|
||||
} catch (InterruptedException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
@ -172,7 +172,7 @@ public final class StreamThrottlerSupervisor implements Runnable, SecureMultiThr
|
||||
try {
|
||||
_timer_lock.wait();
|
||||
} catch (InterruptedException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -198,5 +198,6 @@ public final class StreamThrottlerSupervisor implements Runnable, SecureMultiThr
|
||||
|
||||
return queue;
|
||||
}
|
||||
private static final Logger LOG = Logger.getLogger(StreamThrottlerSupervisor.class.getName());
|
||||
|
||||
}
|
||||
|
@ -224,7 +224,7 @@ public final class StreamerDialog extends javax.swing.JDialog implements Clipboa
|
||||
|
||||
error = true;
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
|
||||
String data;
|
||||
@ -266,7 +266,7 @@ public final class StreamerDialog extends javax.swing.JDialog implements Clipboa
|
||||
getParent().dispatchEvent(new WindowEvent(tthis, WINDOW_CLOSING));
|
||||
}
|
||||
} catch (UnsupportedEncodingException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
|
||||
}
|
||||
@ -363,5 +363,6 @@ public final class StreamerDialog extends javax.swing.JDialog implements Clipboa
|
||||
private javax.swing.JComboBox<String> use_mega_account_down_combobox;
|
||||
private javax.swing.JLabel use_mega_account_down_label;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
private static final Logger LOG = Logger.getLogger(StreamerDialog.class.getName());
|
||||
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package com.tonikelope.megabasterd;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -170,5 +171,6 @@ public final class ThrottledInputStream extends InputStream {
|
||||
_slice_size = req_slice_size;
|
||||
}
|
||||
}
|
||||
private static final Logger LOG = Logger.getLogger(ThrottledInputStream.class.getName());
|
||||
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package com.tonikelope.megabasterd;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -78,5 +79,6 @@ public final class ThrottledOutputStream extends OutputStream {
|
||||
_slice_size = req_slice_size;
|
||||
}
|
||||
}
|
||||
private static final Logger LOG = Logger.getLogger(ThrottledOutputStream.class.getName());
|
||||
|
||||
}
|
||||
|
@ -204,7 +204,7 @@ abstract public class TransferenceManager implements Runnable, SecureSingleThrea
|
||||
try {
|
||||
_secure_notify_lock.wait();
|
||||
} catch (InterruptedException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
@ -630,7 +630,7 @@ abstract public class TransferenceManager implements Runnable, SecureSingleThrea
|
||||
run.run();
|
||||
} catch (Exception ex) {
|
||||
run_error = true;
|
||||
Logger.getLogger(getClass().getName()).log(SEVERE, null, ex);
|
||||
LOG.log(SEVERE, null, ex);
|
||||
}
|
||||
} while (run_error);
|
||||
}
|
||||
@ -718,4 +718,6 @@ abstract public class TransferenceManager implements Runnable, SecureSingleThrea
|
||||
|
||||
}
|
||||
|
||||
private static final Logger LOG = Logger.getLogger(TransferenceManager.class.getName());
|
||||
|
||||
}
|
||||
|
@ -305,7 +305,7 @@ public final class Upload implements Transference, Runnable, SecureSingleThreadN
|
||||
try {
|
||||
Thread.sleep(250);
|
||||
} catch (InterruptedException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
@ -319,7 +319,7 @@ public final class Upload implements Transference, Runnable, SecureSingleThreadN
|
||||
try {
|
||||
Thread.sleep(250);
|
||||
} catch (InterruptedException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
@ -346,7 +346,7 @@ public final class Upload implements Transference, Runnable, SecureSingleThreadN
|
||||
_secure_notify_lock.wait();
|
||||
} catch (InterruptedException ex) {
|
||||
_exit = true;
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
@ -392,11 +392,11 @@ public final class Upload implements Transference, Runnable, SecureSingleThreadN
|
||||
|
||||
_provision_ok = true;
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "LAST CHUNK ID UPLOADED -> " + _last_chunk_id_dispatched);
|
||||
LOG.log(Level.INFO, "LAST CHUNK ID UPLOADED -> {0}", _last_chunk_id_dispatched);
|
||||
}
|
||||
|
||||
} catch (SQLException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
@ -610,12 +610,12 @@ public final class Upload implements Transference, Runnable, SecureSingleThreadN
|
||||
|
||||
try {
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} Starting chunkuploader from startslot()...", Thread.currentThread().getName());
|
||||
LOG.log(Level.INFO, "{0} Starting chunkuploader from startslot()...", Thread.currentThread().getName());
|
||||
|
||||
_thread_pool.execute(c);
|
||||
|
||||
} catch (java.util.concurrent.RejectedExecutionException e) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, e.getMessage());
|
||||
LOG.log(Level.INFO, e.getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
@ -679,7 +679,7 @@ public final class Upload implements Transference, Runnable, SecureSingleThreadN
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} Uploader hello! {1}", new Object[]{Thread.currentThread().getName(), this.getFile_name()});
|
||||
LOG.log(Level.INFO, "{0} Uploader hello! {1}", new Object[]{Thread.currentThread().getName(), this.getFile_name()});
|
||||
|
||||
swingInvoke(
|
||||
new Runnable() {
|
||||
@ -706,7 +706,7 @@ public final class Upload implements Transference, Runnable, SecureSingleThreadN
|
||||
|
||||
long wait_time = MiscTools.getWaitTimeExpBackOff(++conta_error);
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} Uploader {1} Upload URL is null, retrying in {2} secs...", new Object[]{Thread.currentThread().getName(), this.getFile_name(), wait_time});
|
||||
LOG.log(Level.INFO, "{0} Uploader {1} Upload URL is null, retrying in {2} secs...", new Object[]{Thread.currentThread().getName(), this.getFile_name(), wait_time});
|
||||
|
||||
try {
|
||||
|
||||
@ -714,7 +714,7 @@ public final class Upload implements Transference, Runnable, SecureSingleThreadN
|
||||
|
||||
} catch (InterruptedException ex) {
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
@ -727,7 +727,7 @@ public final class Upload implements Transference, Runnable, SecureSingleThreadN
|
||||
DBTools.updateUploadUrl(_file_name, _ma.getFull_email(), _ul_url);
|
||||
|
||||
} catch (SQLException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -779,7 +779,7 @@ public final class Upload implements Transference, Runnable, SecureSingleThreadN
|
||||
|
||||
_chunkworkers.add(c);
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} Starting chunkuploader {1} ...", new Object[]{Thread.currentThread().getName(), t});
|
||||
LOG.log(Level.INFO, "{0} Starting chunkuploader {1} ...", new Object[]{Thread.currentThread().getName(), t});
|
||||
|
||||
_thread_pool.execute(c);
|
||||
}
|
||||
@ -818,7 +818,7 @@ public final class Upload implements Transference, Runnable, SecureSingleThreadN
|
||||
|
||||
_thread_pool.shutdown();
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} Chunkuploaders finished! {1}", new Object[]{Thread.currentThread().getName(), this.getFile_name()});
|
||||
LOG.log(Level.INFO, "{0} Chunkuploaders finished! {1}", new Object[]{Thread.currentThread().getName(), this.getFile_name()});
|
||||
|
||||
getProgress_meter().setExit(true);
|
||||
|
||||
@ -826,22 +826,22 @@ public final class Upload implements Transference, Runnable, SecureSingleThreadN
|
||||
|
||||
try {
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0}Waiting for all threads to finish {1}...", new Object[]{Thread.currentThread().getName(), this.getFile_name()});
|
||||
LOG.log(Level.INFO, "{0}Waiting for all threads to finish {1}...", new Object[]{Thread.currentThread().getName(), this.getFile_name()});
|
||||
|
||||
_thread_pool.awaitTermination(MAX_WAIT_WORKERS_SHUTDOWN, TimeUnit.SECONDS);
|
||||
|
||||
} catch (InterruptedException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
|
||||
if (!_thread_pool.isTerminated()) {
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} Closing thread pool in ''mecag\u00fcen'' style {1}...", new Object[]{Thread.currentThread().getName(), this.getFile_name()});
|
||||
LOG.log(Level.INFO, "{0} Closing thread pool in ''mecag\u00fcen'' style {1}...", new Object[]{Thread.currentThread().getName(), this.getFile_name()});
|
||||
|
||||
_thread_pool.shutdownNow();
|
||||
}
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} Uploader thread pool finished! {1}", new Object[]{Thread.currentThread().getName(), this.getFile_name()});
|
||||
LOG.log(Level.INFO, "{0} Uploader thread pool finished! {1}", new Object[]{Thread.currentThread().getName(), this.getFile_name()});
|
||||
|
||||
getMain_panel().getGlobal_up_speed().detachTransference(this);
|
||||
|
||||
@ -862,7 +862,7 @@ public final class Upload implements Transference, Runnable, SecureSingleThreadN
|
||||
|
||||
if (_completion_handle != null) {
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} Uploader creating NEW MEGA NODE {1}...", new Object[]{Thread.currentThread().getName(), this.getFile_name()});
|
||||
LOG.log(Level.INFO, "{0} Uploader creating NEW MEGA NODE {1}...", new Object[]{Thread.currentThread().getName(), this.getFile_name()});
|
||||
|
||||
getView().printStatusNormal("Creating new MEGA node ... ***DO NOT EXIT MEGABASTERD NOW***");
|
||||
|
||||
@ -883,7 +883,7 @@ public final class Upload implements Transference, Runnable, SecureSingleThreadN
|
||||
|
||||
long wait_time = MiscTools.getWaitTimeExpBackOff(++conta_error);
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} Uploader {1} Finisih upload res is null, retrying in {2} secs...", new Object[]{Thread.currentThread().getName(), this.getFile_name(), wait_time});
|
||||
LOG.log(Level.INFO, "{0} Uploader {1} Finisih upload res is null, retrying in {2} secs...", new Object[]{Thread.currentThread().getName(), this.getFile_name(), wait_time});
|
||||
|
||||
try {
|
||||
|
||||
@ -891,7 +891,7 @@ public final class Upload implements Transference, Runnable, SecureSingleThreadN
|
||||
|
||||
} catch (InterruptedException ex) {
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
@ -916,7 +916,7 @@ public final class Upload implements Transference, Runnable, SecureSingleThreadN
|
||||
});
|
||||
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
|
||||
getView().printStatusOK(LabelTranslatorSingleton.getInstance().translate("File successfully uploaded! (") + _ma.getFull_email() + ")");
|
||||
@ -981,7 +981,7 @@ public final class Upload implements Transference, Runnable, SecureSingleThreadN
|
||||
try {
|
||||
DBTools.deleteUpload(_file_name, _ma.getFull_email());
|
||||
} catch (SQLException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1064,7 +1064,7 @@ public final class Upload implements Transference, Runnable, SecureSingleThreadN
|
||||
|
||||
getMain_panel().getUpload_manager().getFinishing_uploads_queue().remove(this);
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} Uploader {1} BYE BYE", new Object[]{Thread.currentThread().getName(), this.getFile_name()});
|
||||
LOG.log(Level.INFO, "{0} Uploader {1} BYE BYE", new Object[]{Thread.currentThread().getName(), this.getFile_name()});
|
||||
}
|
||||
|
||||
public void pause_worker() {
|
||||
@ -1293,4 +1293,5 @@ public final class Upload implements Transference, Runnable, SecureSingleThreadN
|
||||
public void downWaitQueue() {
|
||||
_main_panel.getUpload_manager().downWaitQueue(this);
|
||||
}
|
||||
private static final Logger LOG = Logger.getLogger(Upload.class.getName());
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ public final class UploadMACGenerator implements Runnable, SecureSingleThreadNot
|
||||
_secure_notify_lock.wait();
|
||||
} catch (InterruptedException ex) {
|
||||
_exit = true;
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
@ -155,7 +155,7 @@ public final class UploadMACGenerator implements Runnable, SecureSingleThreadNot
|
||||
file_mac = bin2i32a(cryptor.doFinal(i32a2bin(file_mac)));
|
||||
|
||||
} catch (IOException | IllegalBlockSizeException | BadPaddingException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
|
||||
chunk_id++;
|
||||
@ -178,7 +178,7 @@ public final class UploadMACGenerator implements Runnable, SecureSingleThreadNot
|
||||
}
|
||||
}
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} MAC GENERATOR {1} finished MAC CALCULATION. Waiting workers to finish uploading...", new Object[]{Thread.currentThread().getName(), this.getUpload().getFile_name()});
|
||||
LOG.log(Level.INFO, "{0} MAC GENERATOR {1} finished MAC CALCULATION. Waiting workers to finish uploading...", new Object[]{Thread.currentThread().getName(), this.getUpload().getFile_name()});
|
||||
|
||||
while (!_exit && !_upload.isStopped() && !_upload.getChunkworkers().isEmpty()) {
|
||||
while (_upload.getMain_panel().isExit()) {
|
||||
@ -193,12 +193,13 @@ public final class UploadMACGenerator implements Runnable, SecureSingleThreadNot
|
||||
|
||||
_upload.secureNotify();
|
||||
|
||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} MAC GENERATOR {1} BYE BYE...", new Object[]{Thread.currentThread().getName(), this.getUpload().getFile_name()});
|
||||
LOG.log(Level.INFO, "{0} MAC GENERATOR {1} BYE BYE...", new Object[]{Thread.currentThread().getName(), this.getUpload().getFile_name()});
|
||||
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
|
||||
}
|
||||
private static final Logger LOG = Logger.getLogger(UploadMACGenerator.class.getName());
|
||||
|
||||
}
|
||||
|
@ -124,10 +124,11 @@ public final class UploadManager extends TransferenceManager {
|
||||
try {
|
||||
DBTools.deleteUploads(delete_up.toArray(new String[delete_up.size()][]));
|
||||
} catch (SQLException ex) {
|
||||
Logger.getLogger(getClass().getName()).log(SEVERE, null, ex);
|
||||
LOG.log(SEVERE, null, ex);
|
||||
}
|
||||
|
||||
secureNotify();
|
||||
}
|
||||
private static final Logger LOG = Logger.getLogger(UploadManager.class.getName());
|
||||
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ import static com.tonikelope.megabasterd.Transference.*;
|
||||
import java.awt.Color;
|
||||
import static java.lang.Integer.MAX_VALUE;
|
||||
import java.util.concurrent.Callable;
|
||||
import java.util.logging.Logger;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JLabel;
|
||||
@ -457,7 +458,14 @@ public final class UploadView extends javax.swing.JPanel implements Transference
|
||||
|
||||
_upload.downWaitQueue();
|
||||
|
||||
queue_down_button.setEnabled(true);
|
||||
swingInvoke(
|
||||
new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
queue_down_button.setEnabled(true);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
@ -683,5 +691,6 @@ public final class UploadView extends javax.swing.JPanel implements Transference
|
||||
private javax.swing.JLabel status_label;
|
||||
private javax.swing.JButton stop_button;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
private static final Logger LOG = Logger.getLogger(UploadView.class.getName());
|
||||
|
||||
}
|
||||
|
@ -16,9 +16,10 @@
|
||||
*/
|
||||
package com.tonikelope.megabasterd;
|
||||
|
||||
import static com.tonikelope.megabasterd.MainPanel.GUI_FONT;
|
||||
import static com.tonikelope.megabasterd.MiscTools.translateLabels;
|
||||
import static com.tonikelope.megabasterd.MiscTools.updateFonts;
|
||||
import static com.tonikelope.megabasterd.MainPanel.GUI_FONT;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -133,4 +134,5 @@ public class WarningExitMessage extends javax.swing.JDialog {
|
||||
private javax.swing.JPanel jPanel1;
|
||||
private javax.swing.JLabel warning_label;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
private static final Logger LOG = Logger.getLogger(WarningExitMessage.class.getName());
|
||||
}
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 212 KiB After Width: | Height: | Size: 234 KiB |
Loading…
x
Reference in New Issue
Block a user