Multi language fix
master
tonikelope 2022-06-22 13:36:45 +02:00
parent 8a9e327aaf
commit 5776c34980
22 changed files with 192 additions and 148 deletions

View File

@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.tonikelope</groupId>
<artifactId>MegaBasterd</artifactId>
<version>7.54</version>
<version>7.55</version>
<packaging>jar</packaging>
<dependencies>
<dependency>

View File

@ -293,7 +293,7 @@ public class ChunkDownloader implements Runnable, SecureSingleThreadNotifiable {
tmp_chunk_file = new File(_download.getChunkmanager().getChunks_dir() + "/" + new File(_download.getFile_name()).getName() + ".chunk" + chunk_id + ".tmp");
try (InputStream is = new ThrottledInputStream(con.getInputStream(), _download.getMain_panel().getStream_supervisor()); OutputStream tmp_chunk_file_os = new BufferedOutputStream(new FileOutputStream(tmp_chunk_file))) {
try ( InputStream is = new ThrottledInputStream(con.getInputStream(), _download.getMain_panel().getStream_supervisor()); OutputStream tmp_chunk_file_os = new BufferedOutputStream(new FileOutputStream(tmp_chunk_file))) {
init_chunk_time = System.currentTimeMillis();

View File

@ -185,7 +185,7 @@ public class ChunkUploader implements Runnable, SecureSingleThreadNotifiable {
f.seek(chunk_offset);
try (CipherInputStream cis = new CipherInputStream(new BufferedInputStream(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())) {
try ( CipherInputStream cis = new CipherInputStream(new BufferedInputStream(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())) {
LOG.log(Level.INFO, "{0} Uploading chunk {1} from worker {2} {3}...", new Object[]{Thread.currentThread().getName(), chunk_id, _id, _upload.getFile_name()});
@ -223,7 +223,7 @@ public class ChunkUploader implements Runnable, SecureSingleThreadNotifiable {
String httpresponse;
try (InputStream is = con.getInputStream(); ByteArrayOutputStream byte_res = new ByteArrayOutputStream()) {
try ( InputStream is = con.getInputStream(); ByteArrayOutputStream byte_res = new ByteArrayOutputStream()) {
while ((reads = is.read(buffer)) != -1) {
byte_res.write(buffer, 0, reads);

View File

@ -205,7 +205,7 @@ public class ChunkWriterManager implements Runnable, SecureSingleThreadNotifiabl
int reads;
try (CipherInputStream cis = new CipherInputStream(new BufferedInputStream(new FileInputStream(chunk_file)), genDecrypter("AES", "AES/CTR/NoPadding", _byte_file_key, forwardMEGALinkKeyIV(_byte_iv, _bytes_written)))) {
try ( CipherInputStream cis = new CipherInputStream(new BufferedInputStream(new FileInputStream(chunk_file)), genDecrypter("AES", "AES/CTR/NoPadding", _byte_file_key, forwardMEGALinkKeyIV(_byte_iv, _bytes_written)))) {
while ((reads = cis.read(buffer)) != -1) {
_download.getOutput_stream().write(buffer, 0, reads);
}

View File

@ -300,7 +300,7 @@ public class CryptTools {
if (compression) {
try (InputStream is = new GZIPInputStream(new ByteArrayInputStream(elc_byte)); ByteArrayOutputStream out = new ByteArrayOutputStream()) {
try ( InputStream is = new GZIPInputStream(new ByteArrayInputStream(elc_byte)); ByteArrayOutputStream out = new ByteArrayOutputStream()) {
byte[] buffer = new byte[MainPanel.DEFAULT_BYTE_BUFFER_SIZE];
@ -428,7 +428,7 @@ public class CryptTools {
con.getOutputStream().close();
try (InputStream is = con.getInputStream(); ByteArrayOutputStream out = new ByteArrayOutputStream()) {
try ( InputStream is = con.getInputStream(); ByteArrayOutputStream out = new ByteArrayOutputStream()) {
byte[] buffer = new byte[MainPanel.DEFAULT_BYTE_BUFFER_SIZE];
@ -549,7 +549,7 @@ public class CryptTools {
String enc_dlc_key;
try (InputStream is = con.getInputStream(); ByteArrayOutputStream out = new ByteArrayOutputStream()) {
try ( InputStream is = con.getInputStream(); ByteArrayOutputStream out = new ByteArrayOutputStream()) {
byte[] buffer = new byte[MainPanel.DEFAULT_BYTE_BUFFER_SIZE];
int reads;
while ((reads = is.read(buffer)) != -1) {

View File

@ -21,7 +21,7 @@ public class DBTools {
public static synchronized void setupSqliteTables() throws SQLException {
try (Connection conn = SqliteSingleton.getInstance().getConn(); Statement stat = conn.createStatement()) {
try ( Connection conn = SqliteSingleton.getInstance().getConn(); Statement stat = conn.createStatement()) {
stat.executeUpdate("CREATE TABLE IF NOT EXISTS downloads(url TEXT, email TEXT, path TEXT, filename TEXT, filekey TEXT, filesize UNSIGNED BIG INT, filepass VARCHAR(64), filenoexpire VARCHAR(64), custom_chunks_dir TEXT, PRIMARY KEY ('url'), UNIQUE(path, filename));");
stat.executeUpdate("CREATE TABLE IF NOT EXISTS uploads(filename TEXT, email TEXT, url TEXT, ul_key TEXT, parent_node TEXT, root_node TEXT, share_key TEXT, folder_link TEXT, bytes_uploaded UNSIGNED BIG INT, meta_mac TEXT, PRIMARY KEY ('filename'), UNIQUE(filename, email));");
@ -36,7 +36,7 @@ public class DBTools {
public static synchronized void vaccum() throws SQLException {
try (Connection conn = SqliteSingleton.getInstance().getConn(); Statement stat = conn.createStatement()) {
try ( Connection conn = SqliteSingleton.getInstance().getConn(); Statement stat = conn.createStatement()) {
stat.execute("VACUUM");
}
@ -44,7 +44,7 @@ public class DBTools {
public static synchronized void insertDownloadsQueue(ArrayList<String> queue) throws SQLException {
try (Connection conn = SqliteSingleton.getInstance().getConn(); PreparedStatement ps = conn.prepareStatement("INSERT OR REPLACE INTO downloads_queue (url) VALUES (?)")) {
try ( Connection conn = SqliteSingleton.getInstance().getConn(); PreparedStatement ps = conn.prepareStatement("INSERT OR REPLACE INTO downloads_queue (url) VALUES (?)")) {
if (!queue.isEmpty()) {
@ -66,7 +66,7 @@ public class DBTools {
ResultSet res;
try (Connection conn = SqliteSingleton.getInstance().getConn(); Statement stat = conn.createStatement()) {
try ( Connection conn = SqliteSingleton.getInstance().getConn(); Statement stat = conn.createStatement()) {
res = stat.executeQuery("SELECT * FROM downloads_queue ORDER BY rowid");
@ -81,7 +81,7 @@ public class DBTools {
public static synchronized void truncateDownloadsQueue() throws SQLException {
try (Connection conn = SqliteSingleton.getInstance().getConn(); Statement stat = conn.createStatement()) {
try ( Connection conn = SqliteSingleton.getInstance().getConn(); Statement stat = conn.createStatement()) {
stat.execute("DELETE FROM downloads_queue");
}
@ -89,7 +89,7 @@ public class DBTools {
public static synchronized void insertUploadsQueue(ArrayList<String> queue) throws SQLException {
try (Connection conn = SqliteSingleton.getInstance().getConn(); PreparedStatement ps = conn.prepareStatement("INSERT OR REPLACE INTO uploads_queue (filename) VALUES (?)")) {
try ( Connection conn = SqliteSingleton.getInstance().getConn(); PreparedStatement ps = conn.prepareStatement("INSERT OR REPLACE INTO uploads_queue (filename) VALUES (?)")) {
if (!queue.isEmpty()) {
@ -111,7 +111,7 @@ public class DBTools {
ResultSet res;
try (Connection conn = SqliteSingleton.getInstance().getConn(); Statement stat = conn.createStatement()) {
try ( Connection conn = SqliteSingleton.getInstance().getConn(); Statement stat = conn.createStatement()) {
res = stat.executeQuery("SELECT * FROM uploads_queue ORDER BY rowid");
@ -126,7 +126,7 @@ public class DBTools {
public static synchronized void truncateUploadsQueue() throws SQLException {
try (Connection conn = SqliteSingleton.getInstance().getConn(); Statement stat = conn.createStatement()) {
try ( Connection conn = SqliteSingleton.getInstance().getConn(); Statement stat = conn.createStatement()) {
stat.execute("DELETE FROM uploads_queue");
}
@ -134,7 +134,7 @@ public class DBTools {
public static synchronized void insertMegaSession(String email, byte[] ma, boolean crypt) throws SQLException {
try (Connection conn = SqliteSingleton.getInstance().getConn(); PreparedStatement ps = conn.prepareStatement("INSERT OR REPLACE INTO mega_sessions (email, ma, crypt) VALUES (?,?,?)")) {
try ( Connection conn = SqliteSingleton.getInstance().getConn(); PreparedStatement ps = conn.prepareStatement("INSERT OR REPLACE INTO mega_sessions (email, ma, crypt) VALUES (?,?,?)")) {
ps.setString(1, email);
ps.setBytes(2, ma);
@ -146,7 +146,7 @@ public class DBTools {
public static synchronized void truncateMegaSessions() throws SQLException {
try (Connection conn = SqliteSingleton.getInstance().getConn(); Statement stat = conn.createStatement()) {
try ( Connection conn = SqliteSingleton.getInstance().getConn(); Statement stat = conn.createStatement()) {
stat.execute("DELETE FROM mega_sessions");
}
@ -156,7 +156,7 @@ public class DBTools {
HashMap<String, Object> session = null;
try (Connection conn = SqliteSingleton.getInstance().getConn(); PreparedStatement ps = conn.prepareStatement("SELECT * from mega_sessions WHERE email=?")) {
try ( Connection conn = SqliteSingleton.getInstance().getConn(); PreparedStatement ps = conn.prepareStatement("SELECT * from mega_sessions WHERE email=?")) {
ps.setString(1, email);
@ -181,7 +181,7 @@ public class DBTools {
public static synchronized void insertDownload(String url, String email, String path, String filename, String filekey, Long size, String filepass, String filenoexpire, String custom_chunks_dir) throws SQLException {
try (Connection conn = SqliteSingleton.getInstance().getConn(); PreparedStatement ps = conn.prepareStatement("INSERT INTO downloads (url, email, path, filename, filekey, filesize, filepass, filenoexpire, custom_chunks_dir) VALUES (?,?,?,?,?,?,?,?,?)")) {
try ( Connection conn = SqliteSingleton.getInstance().getConn(); PreparedStatement ps = conn.prepareStatement("INSERT INTO downloads (url, email, path, filename, filekey, filesize, filepass, filenoexpire, custom_chunks_dir) VALUES (?,?,?,?,?,?,?,?,?)")) {
ps.setString(1, url);
ps.setString(2, email);
@ -199,7 +199,7 @@ public class DBTools {
public static synchronized void deleteDownload(String url) throws SQLException {
try (Connection conn = SqliteSingleton.getInstance().getConn(); PreparedStatement ps = conn.prepareStatement("DELETE FROM downloads WHERE url=?")) {
try ( Connection conn = SqliteSingleton.getInstance().getConn(); PreparedStatement ps = conn.prepareStatement("DELETE FROM downloads WHERE url=?")) {
ps.setString(1, url);
@ -210,7 +210,7 @@ public class DBTools {
public static synchronized void deleteDownloads(String[] urls) throws SQLException {
try (Connection conn = SqliteSingleton.getInstance().getConn(); PreparedStatement ps = conn.prepareStatement("DELETE FROM downloads WHERE url=?")) {
try ( Connection conn = SqliteSingleton.getInstance().getConn(); PreparedStatement ps = conn.prepareStatement("DELETE FROM downloads WHERE url=?")) {
for (String url : urls) {
@ -225,7 +225,7 @@ public class DBTools {
public static synchronized void insertUpload(String filename, String email, String parent_node, String ul_key, String root_node, String share_key, String folder_link) throws SQLException {
try (Connection conn = SqliteSingleton.getInstance().getConn(); PreparedStatement ps = conn.prepareStatement("INSERT INTO uploads (filename, email, parent_node, ul_key, root_node, share_key, folder_link, bytes_uploaded, meta_mac) VALUES (?,?,?,?,?,?,?,?,?)")) {
try ( Connection conn = SqliteSingleton.getInstance().getConn(); PreparedStatement ps = conn.prepareStatement("INSERT INTO uploads (filename, email, parent_node, ul_key, root_node, share_key, folder_link, bytes_uploaded, meta_mac) VALUES (?,?,?,?,?,?,?,?,?)")) {
ps.setString(1, filename);
ps.setString(2, email);
@ -243,7 +243,7 @@ public class DBTools {
public static synchronized void updateUploadUrl(String filename, String email, String ul_url) throws SQLException {
try (Connection conn = SqliteSingleton.getInstance().getConn(); PreparedStatement ps = conn.prepareStatement("UPDATE uploads SET url=? WHERE filename=? AND email=?")) {
try ( Connection conn = SqliteSingleton.getInstance().getConn(); PreparedStatement ps = conn.prepareStatement("UPDATE uploads SET url=? WHERE filename=? AND email=?")) {
ps.setString(1, ul_url);
ps.setString(2, filename);
@ -255,7 +255,7 @@ public class DBTools {
public static synchronized void updateUploadProgress(String filename, String email, Long bytes_uploaded, String meta_mac) throws SQLException {
try (Connection conn = SqliteSingleton.getInstance().getConn(); PreparedStatement ps = conn.prepareStatement("UPDATE uploads SET bytes_uploaded=?,meta_mac=? WHERE filename=? AND email=?")) {
try ( Connection conn = SqliteSingleton.getInstance().getConn(); PreparedStatement ps = conn.prepareStatement("UPDATE uploads SET bytes_uploaded=?,meta_mac=? WHERE filename=? AND email=?")) {
ps.setLong(1, bytes_uploaded);
ps.setString(2, meta_mac);
@ -268,7 +268,7 @@ public class DBTools {
public static synchronized HashMap<String, Object> selectUploadProgress(String filename, String email) throws SQLException {
try (Connection conn = SqliteSingleton.getInstance().getConn(); PreparedStatement ps = conn.prepareStatement("SELECT bytes_uploaded,meta_mac FROM uploads WHERE filename=? AND email=?")) {
try ( Connection conn = SqliteSingleton.getInstance().getConn(); PreparedStatement ps = conn.prepareStatement("SELECT bytes_uploaded,meta_mac FROM uploads WHERE filename=? AND email=?")) {
ps.setString(1, filename);
ps.setString(2, email);
@ -288,7 +288,7 @@ public class DBTools {
public static synchronized void deleteUpload(String filename, String email) throws SQLException {
try (Connection conn = SqliteSingleton.getInstance().getConn(); PreparedStatement ps = conn.prepareStatement("DELETE FROM uploads WHERE filename=? AND email=?")) {
try ( Connection conn = SqliteSingleton.getInstance().getConn(); PreparedStatement ps = conn.prepareStatement("DELETE FROM uploads WHERE filename=? AND email=?")) {
ps.setString(1, filename);
@ -300,7 +300,7 @@ public class DBTools {
public static synchronized void deleteUploads(String[][] uploads) throws SQLException {
try (Connection conn = SqliteSingleton.getInstance().getConn(); PreparedStatement ps = conn.prepareStatement("DELETE FROM uploads WHERE filename=? AND email=?")) {
try ( Connection conn = SqliteSingleton.getInstance().getConn(); PreparedStatement ps = conn.prepareStatement("DELETE FROM uploads WHERE filename=? AND email=?")) {
for (String[] upload : uploads) {
@ -317,7 +317,7 @@ public class DBTools {
String value = null;
try (Connection conn = SqliteSingleton.getInstance().getConn(); PreparedStatement ps = conn.prepareStatement("SELECT value from settings WHERE key=?")) {
try ( Connection conn = SqliteSingleton.getInstance().getConn(); PreparedStatement ps = conn.prepareStatement("SELECT value from settings WHERE key=?")) {
ps.setString(1, key);
@ -335,7 +335,7 @@ public class DBTools {
public static synchronized void insertSettingValue(String key, String value) throws SQLException {
try (Connection conn = SqliteSingleton.getInstance().getConn(); PreparedStatement ps = conn.prepareStatement("INSERT OR REPLACE INTO settings (key,value) VALUES (?, ?)")) {
try ( Connection conn = SqliteSingleton.getInstance().getConn(); PreparedStatement ps = conn.prepareStatement("INSERT OR REPLACE INTO settings (key,value) VALUES (?, ?)")) {
ps.setString(1, key);
@ -351,7 +351,7 @@ public class DBTools {
ResultSet res;
try (Connection conn = SqliteSingleton.getInstance().getConn(); Statement stat = conn.createStatement()) {
try ( Connection conn = SqliteSingleton.getInstance().getConn(); Statement stat = conn.createStatement()) {
res = stat.executeQuery("SELECT * FROM settings");
@ -366,7 +366,7 @@ public class DBTools {
public static synchronized void insertSettingsValues(HashMap<String, Object> settings) throws SQLException {
try (Connection conn = SqliteSingleton.getInstance().getConn(); PreparedStatement ps = conn.prepareStatement("INSERT OR REPLACE INTO settings (key,value) VALUES (?, ?)")) {
try ( Connection conn = SqliteSingleton.getInstance().getConn(); PreparedStatement ps = conn.prepareStatement("INSERT OR REPLACE INTO settings (key,value) VALUES (?, ?)")) {
for (Map.Entry<String, Object> entry : settings.entrySet()) {
@ -385,7 +385,7 @@ public class DBTools {
ResultSet res;
try (Connection conn = SqliteSingleton.getInstance().getConn(); Statement stat = conn.createStatement()) {
try ( Connection conn = SqliteSingleton.getInstance().getConn(); Statement stat = conn.createStatement()) {
res = stat.executeQuery("SELECT * FROM downloads");
@ -415,7 +415,7 @@ public class DBTools {
ResultSet res;
try (Connection conn = SqliteSingleton.getInstance().getConn(); Statement stat = conn.createStatement()) {
try ( Connection conn = SqliteSingleton.getInstance().getConn(); Statement stat = conn.createStatement()) {
res = stat.executeQuery("SELECT * FROM uploads");
@ -446,7 +446,7 @@ public class DBTools {
ResultSet res;
try (Connection conn = SqliteSingleton.getInstance().getConn(); Statement stat = conn.createStatement()) {
try ( Connection conn = SqliteSingleton.getInstance().getConn(); Statement stat = conn.createStatement()) {
res = stat.executeQuery("SELECT * FROM mega_accounts");
@ -467,7 +467,7 @@ public class DBTools {
public static synchronized void insertMegaAccounts(HashMap<String, Object> accounts) throws SQLException {
try (Connection conn = SqliteSingleton.getInstance().getConn(); PreparedStatement ps = conn.prepareStatement("INSERT OR REPLACE INTO mega_accounts (email,password,password_aes,user_hash) VALUES (?, ?, ?, ?)")) {
try ( Connection conn = SqliteSingleton.getInstance().getConn(); PreparedStatement ps = conn.prepareStatement("INSERT OR REPLACE INTO mega_accounts (email,password,password_aes,user_hash) VALUES (?, ?, ?, ?)")) {
if (!accounts.isEmpty()) {
@ -491,7 +491,7 @@ public class DBTools {
public static synchronized void insertELCAccounts(HashMap<String, Object> accounts) throws SQLException {
try (Connection conn = SqliteSingleton.getInstance().getConn(); PreparedStatement ps = conn.prepareStatement("INSERT OR REPLACE INTO elc_accounts (host,user,apikey) VALUES (?, ?, ?)")) {
try ( Connection conn = SqliteSingleton.getInstance().getConn(); PreparedStatement ps = conn.prepareStatement("INSERT OR REPLACE INTO elc_accounts (host,user,apikey) VALUES (?, ?, ?)")) {
if (!accounts.isEmpty()) {
@ -518,7 +518,7 @@ public class DBTools {
ResultSet res;
try (Connection conn = SqliteSingleton.getInstance().getConn(); Statement stat = conn.createStatement()) {
try ( Connection conn = SqliteSingleton.getInstance().getConn(); Statement stat = conn.createStatement()) {
res = stat.executeQuery("SELECT * FROM elc_accounts");
@ -538,7 +538,7 @@ public class DBTools {
public static synchronized void insertMegaAccount(String email, String password, String password_aes, String user_hash) throws SQLException {
try (Connection conn = SqliteSingleton.getInstance().getConn(); PreparedStatement ps = conn.prepareStatement("INSERT OR REPLACE INTO mega_accounts (email,password,password_aes,user_hash) VALUES (?, ?, ?, ?)")) {
try ( Connection conn = SqliteSingleton.getInstance().getConn(); PreparedStatement ps = conn.prepareStatement("INSERT OR REPLACE INTO mega_accounts (email,password,password_aes,user_hash) VALUES (?, ?, ?, ?)")) {
ps.setString(1, email);
@ -556,7 +556,7 @@ public class DBTools {
public static synchronized void insertELCAccount(String host, String user, String apikey) throws SQLException {
try (Connection conn = SqliteSingleton.getInstance().getConn(); PreparedStatement ps = conn.prepareStatement("INSERT OR REPLACE INTO elc_accounts (host,user,apikey) VALUES (?, ?, ?)")) {
try ( Connection conn = SqliteSingleton.getInstance().getConn(); PreparedStatement ps = conn.prepareStatement("INSERT OR REPLACE INTO elc_accounts (host,user,apikey) VALUES (?, ?, ?)")) {
ps.setString(1, host);
@ -571,7 +571,7 @@ public class DBTools {
public static synchronized void deleteMegaAccount(String email) throws SQLException {
try (Connection conn = SqliteSingleton.getInstance().getConn(); PreparedStatement ps = conn.prepareStatement("DELETE from mega_accounts WHERE email=?")) {
try ( Connection conn = SqliteSingleton.getInstance().getConn(); PreparedStatement ps = conn.prepareStatement("DELETE from mega_accounts WHERE email=?")) {
ps.setString(1, email);
@ -581,7 +581,7 @@ public class DBTools {
public static synchronized void deleteELCAccount(String host) throws SQLException {
try (Connection conn = SqliteSingleton.getInstance().getConn(); PreparedStatement ps = conn.prepareStatement("DELETE from elc_accounts WHERE host=?")) {
try ( Connection conn = SqliteSingleton.getInstance().getConn(); PreparedStatement ps = conn.prepareStatement("DELETE from elc_accounts WHERE host=?")) {
ps.setString(1, host);
@ -591,7 +591,7 @@ public class DBTools {
public static synchronized void truncateMegaAccounts() throws SQLException {
try (Connection conn = SqliteSingleton.getInstance().getConn(); Statement stat = conn.createStatement()) {
try ( Connection conn = SqliteSingleton.getInstance().getConn(); Statement stat = conn.createStatement()) {
stat.execute("DELETE FROM mega_accounts");
}
@ -599,7 +599,7 @@ public class DBTools {
public static synchronized void truncateELCAccounts() throws SQLException {
try (Connection conn = SqliteSingleton.getInstance().getConn(); Statement stat = conn.createStatement()) {
try ( Connection conn = SqliteSingleton.getInstance().getConn(); Statement stat = conn.createStatement()) {
stat.execute("DELETE FROM elc_accounts");
}

View File

@ -602,7 +602,7 @@ public class Download implements Transference, Runnable, SecureSingleThreadNotif
getView().printStatusNormal("Truncating temp file...");
try (FileChannel out_truncate = new FileOutputStream(temp_filename, true).getChannel()) {
try ( FileChannel out_truncate = new FileOutputStream(temp_filename, true).getChannel()) {
out_truncate.truncate(max_size);
}
}
@ -1336,7 +1336,7 @@ public class Download implements Transference, Runnable, SecureSingleThreadNotif
Cipher cryptor = genCrypter("AES", "AES/CBC/NoPadding", byte_file_key, i32a2bin(cbc_iv));
try (BufferedInputStream is = new BufferedInputStream(new FileInputStream(filename))) {
try ( BufferedInputStream is = new BufferedInputStream(new FileInputStream(filename))) {
long chunk_id = 1L;
long tot = 0L;

View File

@ -72,7 +72,7 @@ public class FileMergerDialog extends javax.swing.JDialog {
private boolean _mergeFile() throws IOException {
try (RandomAccessFile targetFile = new RandomAccessFile(this.file_name_label.getText(), "rw")) {
try ( RandomAccessFile targetFile = new RandomAccessFile(this.file_name_label.getText(), "rw")) {
FileChannel targetChannel = targetFile.getChannel();

View File

@ -102,7 +102,7 @@ public class FileSplitterDialog extends javax.swing.JDialog {
int position = 0;
int conta_split = 1;
try (RandomAccessFile sourceFile = new RandomAccessFile(this._file.getAbsolutePath(), "r"); FileChannel sourceChannel = sourceFile.getChannel()) {
try ( RandomAccessFile sourceFile = new RandomAccessFile(this._file.getAbsolutePath(), "r"); FileChannel sourceChannel = sourceFile.getChannel()) {
for (; position < numSplits; position++, conta_split++) {
_writePartToFile(bytesPerSplit, position * bytesPerSplit, sourceChannel, conta_split, numSplits + (remainingBytes > 0 ? 1 : 0));
@ -119,7 +119,7 @@ public class FileSplitterDialog extends javax.swing.JDialog {
private void _writePartToFile(long byteSize, long position, FileChannel sourceChannel, int conta_split, long num_splits) throws IOException {
Path fileName = Paths.get(this._output_dir.getAbsolutePath() + "/" + this._file.getName() + ".part" + String.valueOf(conta_split) + "-" + String.valueOf(num_splits));
try (RandomAccessFile toFile = new RandomAccessFile(fileName.toFile(), "rw"); FileChannel toChannel = toFile.getChannel()) {
try ( RandomAccessFile toFile = new RandomAccessFile(fileName.toFile(), "rw"); FileChannel toChannel = toFile.getChannel()) {
sourceChannel.position(position);
toChannel.transferFrom(sourceChannel, 0, byteSize);
}

View File

@ -53,14 +53,14 @@ public class LabelTranslatorSingleton {
_addTranslation("COPY ALL", "COPIA TUTTO");
_addTranslation("ALL COPIED!", "TUTTI COPIATI!");
_addTranslation("FILE WITH SAME NAME AND SIZE ALREADY EXISTS", "ESISTE GIA' UN FILE CON LO STESSO NOME E DIMENSIONE");
_addTranslation("WARNING: USING MEGA API WITHOUT API KEY MAY VIOLATE ITS TERM OF USE. YOU SHOULD GET A KEY -> https://mega.nz/sdk", "ATTENZIONE: L'USO DI API MEGA SENZA CHIAVE API PUÒ VIOLARE IL TERMINE D'USO DI MEGA. DOVRESTI CHIEDERE UNA CHIAVE - > https://mega.nz/sdk");
_addTranslation("WARNING: USING MEGA API WITHOUT API KEY MAY VIOLATE ITS TERM OF USE.\n\nYOU SHOULD GET A KEY -> https://mega.nz/sdk (and set it in MegaBasterd ADVANCED SETTINGS).\n\nCREATE API KEY NOW?", "ATTENZIONE: L'USO DI API MEGA SENZA CHIAVE API PUÒ VIOLARE IL TERMINE D'USO DI MEGA.\\n\nDOVRESTI CHIEDERE UNA CHIAVE - > https://mega.nz/sdk (e impostarla in MegaBasterd - IMPOSTAZIONI AVANZATE).\n\nVUOI CREARE ORA UNA CHIAVE API?");
_addTranslation("WARNING: Using proxies or VPN to bypass MEGA's daily download limitation may violate its Terms of Use. USE THIS OPTION AT YOUR OWN RISK.", "ATTENZIONE: l'uso di proxy o VPN per aggirare la limitazione del download giornaliero di MEGA potrebbe violare i suoi Termini di uso.\n\nUSA QUESTA OPZIONE A TUO RISCHIO.");
_addTranslation("WARNING: USING MEGA API WITHOUT API KEY MAY VIOLATE ITS TERM OF USE. YOU SHOULD GET A KEY -> https://mega.nz/sdk", "ATTENZIONE: L'USO DI API MEGA SENZA CHIAVE API PUÒ VIOLARE IL TERMINE D'USO DI MEGA.\nDOVRESTI CHIEDERE UNA CHIAVE - > https://mega.nz/sdk");
_addTranslation("WARNING: USING MEGA API WITHOUT API KEY MAY VIOLATE ITS TERM OF USE.\n\nYOU SHOULD GET A KEY -> https://mega.nz/sdk (and set it in MegaBasterd ADVANCED SETTINGS).\n\nCREATE API KEY NOW?", "Attenzione: l'usi di API Mega senza chiave API può violare il termine d'uso di Mega.\n\nDovresti chiedere una chiave - > https://mega.nz/sdk (e impostarla in MegaBasterd - Impostazioni avanzate).\n\nVuoi creare ora una chiave API?");
_addTranslation("WARNING: Using proxies or VPN to bypass MEGA's daily download limitation may violate its Terms of Use. USE THIS OPTION AT YOUR OWN RISK.", "ATTENZIONE: l'uso di proxy o VPN per aggirare la limitazione del download giornaliero di MEGA potrebbe violare i suoi Termini di uso.\n\nUsa questa opzione a tuo rischio.");
_addTranslation("Using proxies or VPN to bypass MEGA's daily download limitation may violate its Terms of Use.\n\nUSE THIS OPTION AT YOUR OWN RISK.", "L'uso di proxy o VPN per aggirare la limitazione del download giornaliero di MEGA potrebbe violare i suoi Termini di uso.\n\nNSA QUESTA OPZIONE A TUO RISCHIO.");
_addTranslation("Execute this command when MEGA download limit is reached:", "Quando viene raggiunto il limite di download MEGA esegui questo comando :");
_addTranslation("Execute this command when MEGA download limit is reached:", "Esegui questo comando quando viene raggiunto il limite download MEGA:");
_addTranslation("Use this proxy list (instead of the one included in MegaBasterd) Format is [*]IP:PORT[@user_b64:password_b64]", "Usa questo elenco proxy (invece di quello incluso in MegaBasterd).\nIl formato è [*]IP:PORTA[@user_b64:password_b64]");
_addTranslation("Waiting for completion handler ... ***DO NOT EXIT MEGABASTERD NOW***", "In attesa completamento gestore... ***NON USCIRE DA MEGABASTERD ORA***");
_addTranslation("Finishing calculating CBC-MAC code (this could take a while) ... ***DO NOT EXIT MEGABASTERD NOW***", "Completamento calcolo codice CBC-MAC (questo potrebbe richiedere un po')... ***NON USCIRE DA MEGABASTERD ORA***");
_addTranslation("Waiting for completion handler ... ***DO NOT EXIT MEGABASTERD NOW***", "In attesa completamento gestore... *** Non uscire da MegaBasterd!!! ***");
_addTranslation("Finishing calculating CBC-MAC code (this could take a while) ... ***DO NOT EXIT MEGABASTERD NOW***", "Completamento calcolo codice CBC-MAC (questo potrebbe richiedere un po')... *** Non uscire da MegaBasterd ora!!! ***");
_addTranslation("Split content in different uploads", "Dividi il contenuto in diversi upload");
_addTranslation("Merge content in the same upload", "Unisci contenuti nello stesso upload");
_addTranslation("How do you want to proceed?", "Come vuoi procedere?");
@ -74,19 +74,19 @@ public class LabelTranslatorSingleton {
_addTranslation("There are a lot of files in this folder.\nNot all links will be provisioned at once to avoid saturating MegaBasterd", "Ci sono molti file in questa cartella.\nNon tutti i collegamenti saranno gestiti in una sola volta per evitare di saturare MegaBasterd");
_addTranslation("You've tried to login too many times. Wait an hour.", "Hai provato ad accedere troppe volte.\nAspetta un'ora.");
_addTranslation("MEGA LINK ERROR!", "ERRORE COLLEGAMENTO MEGA!");
_addTranslation("Please enter 2FA PIN CODE", "Inserisci il CODICE PIN 2FA");
_addTranslation("Please enter 2FA PIN CODE", "Inserisci il codice pin 2FA");
_addTranslation("Enable log file", "Abilita file registro");
_addTranslation("Font:", "Font:");
_addTranslation("Loading...", "Caricamento...");
_addTranslation("DEFAULT", "PREDEFINITO");
_addTranslation("ALTERNATIVE", "ALTERNATIVA");
_addTranslation("Download latest version", "Downlaod versione più recente");
_addTranslation("PROVISION FAILED", "FORNITURA FALLITA");
_addTranslation("Download latest version", "Download versione più recente");
_addTranslation("PROVISION FAILED", "Provisioning fallito");
_addTranslation("Error registering download: file is already downloading.", "Errore durante la registrazione del download: il file è già in download.");
_addTranslation("FATAL ERROR! ", "ERRORE FATALE:");
_addTranslation("ERROR: FILE NOT FOUND", "ERRORE: FILE NON TROVATO");
_addTranslation("FATAL ERROR! ", "Errore fatale:");
_addTranslation("ERROR: FILE NOT FOUND", "Errore: file non trovato");
_addTranslation("Mega link is not valid! ", "Collegamento Mega non valido");
_addTranslation("Checking your MEGA accounts, please wait...", "Verifica account MEGA...");
_addTranslation("Checking your MEGA accounts, please wait...", "Verifica account Mega...");
_addTranslation("Check for updates", "Controllo aggiornamenti");
_addTranslation("Checking, please wait...", "Verifica...");
_addTranslation("You have the latest version ;)", "La versione installata è aggiornata :)");
@ -103,16 +103,16 @@ public class LabelTranslatorSingleton {
_addTranslation("Encrypt on disk sensitive information", "Crittografa su disco le informazioni sensibili");
_addTranslation("Allow using MEGA accounts for download/streaming", "Consenti l'uso dell'account MEGA per download/streaming");
_addTranslation("Please wait...", "Attendi...");
_addTranslation("CANCEL RETRY", "ANNULAL RITENTATIVO");
_addTranslation("SPLITTING FILE...", "DIVISIOEN FILE...");
_addTranslation("CANCEL RETRY", "Annulla ritentativo");
_addTranslation("SPLITTING FILE...", "Divisione file...");
_addTranslation("Open folder", "Apri cartella");
_addTranslation("RESUME DOWNLOAD", "RIPREBDI DOWNLOAD");
_addTranslation("RESUME DOWNLOAD", "Riprendi download");
_addTranslation("Close", "Chiudi");
_addTranslation("Add files", "Aggiungi file");
_addTranslation("IMPORT SETTINGS", "IMPORTA IMPOSATZIONI");
_addTranslation("RESET MEGABASTERD", "RIPRISTINA MEGABASTERD");
_addTranslation("RESET ACCOUNTS", "RIPRISTINA CCOUNT");
_addTranslation("Verify file integrity (when download is finished)", "Verifica integrità file (A download completato)");
_addTranslation("IMPORT SETTINGS", "Importa imposatzioni");
_addTranslation("RESET MEGABASTERD", "Ripristina MegaBasterd");
_addTranslation("RESET ACCOUNTS", "Ripristina account");
_addTranslation("Verify file integrity (when download is finished)", "Verifica integrità file (a download completato)");
_addTranslation("Let's dance, baby", "Balliamo, piccola");
_addTranslation("Unlock accounts", "Sblocca account");
_addTranslation("Use MegaCrypter reverse mode", "Usa modalità inversa MegaCrypter");
@ -121,34 +121,34 @@ public class LabelTranslatorSingleton {
_addTranslation("Adding files, please wait...", "Aggiunta file");
_addTranslation("Restart", "Riavvia");
_addTranslation("Use SmartProxy", "Usa SmartProxy");
_addTranslation("PAUSE DOWNLOAD", "PAUSA DOWNLOAD");
_addTranslation("PAUSE DOWNLOAD", "Puasa download");
_addTranslation("Change it", "Modificalo");
_addTranslation("EXPORT SETTINGS", "ESPORTA IMPOSTAZIONI");
_addTranslation("Change output folder", "Modifica cambia cartella destinazione");
_addTranslation("Add account", "Aggiungi account");
_addTranslation("Select file", "Seleziona file");
_addTranslation("Opening file...", "Apertura file..");
_addTranslation("CANCEL DOWNLOAD", "ANNULLA DOWNLOAD");
_addTranslation("REMOVE ALL EXCEPT THIS", "RIMUOVI TUTTO ECCETTO QUESTO");
_addTranslation("CANCEL DOWNLOAD", "Annulla download");
_addTranslation("REMOVE ALL EXCEPT THIS", "Rimuovi tutto eccetto questo");
_addTranslation("Loading DLC, please wait...", "Caricamento DLC...");
_addTranslation("Changing output folder...", "Modifica cartella destinazione...");
_addTranslation("RESUME UPLOAD", "RIPRENDI UPLOAD");
_addTranslation("RESUME UPLOAD", "Riprendi upload");
_addTranslation("Limit upload speed", "Limita velocità upload");
_addTranslation("CANCEL", "ANNULLA");
_addTranslation("Use multi slot download mode", "Usa modo download multi slot");
_addTranslation("Selecting file...", "Sezione file...");
_addTranslation("Copy folder link", "Copia collegamento cartella");
_addTranslation("Limit download speed", "Limite velocità download");
_addTranslation("REMOVE THIS", "RIMUOVI QUESTO");
_addTranslation("REMOVE THIS", "Rimuovi questo");
_addTranslation("Copy file link", "Copia collegamento file");
_addTranslation("Load DLC container", "Carica file DLC");
_addTranslation("Adding folder, please wait...", "Aggiunta cartella...");
_addTranslation("PAUSE UPLOAD", "PAUSA UPLOAD");
_addTranslation("CANCEL CHECK", "ANNULLA CONTROLLO");
_addTranslation("PAUSE UPLOAD", "Pausa upload");
_addTranslation("CANCEL CHECK", "Annulla controllo");
_addTranslation("Keep temp file", "Conserva file temporaneo");
_addTranslation("Use HTTP(S) PROXY", "USA PROXY HTTP/HTTPS");
_addTranslation("MERGING FILE...", "UNIONE FILE...");
_addTranslation("Checking MEGA account...", "Verifica account MEGA...");
_addTranslation("Use HTTP(S) PROXY", "Usa proxy HTTP/HTTPS");
_addTranslation("MERGING FILE...", "Unione file...");
_addTranslation("Checking MEGA account...", "Verifica account Mega...");
_addTranslation("SAVE", "SALVA");
_addTranslation("New download", "Nuovo download");
_addTranslation("New upload", "Nuovo upload");
@ -161,12 +161,12 @@ public class LabelTranslatorSingleton {
_addTranslation("Settings", "Impostazioni");
_addTranslation("Help", "Aiuto");
_addTranslation("About", "Info programma");
_addTranslation("Remember for this session", "Ricoprda per questa sessione");
_addTranslation("Remember for this session", "Ricorda per questa sessione");
_addTranslation("Restore folder data", "Ripristina dati cartella");
_addTranslation("Restoring data, please wait...", "Riprisrino dati...");
_addTranslation("Restoring data, please wait...", "Ripristino dati...");
_addTranslation("File", "File");
_addTranslation("Hide to tray", "Nascondi in barra sistema");
_addTranslation("Clear finished", "Rimuovi file da elenco completati");
_addTranslation("Clear finished", "Rimuovi da elenco file completati");
_addTranslation("Exit", "Esci");
_addTranslation("Default slots per file:", "Slot predefiniti per file:");
_addTranslation("Note: if you want to download without using a MEGA PREMIUM account you SHOULD enable it. (Slots consume RAM, so use them moderately).", "Nota: se vuoi scaricare senza usare un account PREMIUM MEGA è necessario abilitarlo (gli slot consumano RAM, usali moderatamente).");
@ -175,8 +175,8 @@ public class LabelTranslatorSingleton {
_addTranslation("TCP Port:", "Porta TCP");
_addTranslation("Note: you MUST \"OPEN\" this port in your router/firewall.", "Nota: è NECESSARIO \"APRIRE\" questa porta nel router/firewall.");
_addTranslation("Note: enable it in order to mitigate bandwidth limit. (Multi slot required).", "Nota: abilitarlo per mitigare il limite di larghezza di banda (richiesto multi slot).");
_addTranslation("Max parallel downloads:", "N. downlaod contemporanei:");
_addTranslation("Max parallel uploads:", "N. uplaod contemporanei:");
_addTranslation("Max parallel downloads:", "N. download contemporanei:");
_addTranslation("Max parallel uploads:", "N. upload contemporanei:");
_addTranslation("Note: slots consume RAM, so use them moderately.", "Nota: gli slot consumano RAM, usali moderatamente.");
_addTranslation("Note: you can use a (optional) alias for your email addresses -> bob@supermail.com#bob_mail (don't forget to save after entering your accounts).", "Nota: puoi usare un alias (opzionale) per i tuoi indirizzi email -> bob@supermail.com#bob_mail (non dimenticare di salvarlo dopo aver inserito i tuoi account).");
_addTranslation("Your MEGA accounts:", "I tuoi account MEGA:");
@ -205,13 +205,13 @@ public class LabelTranslatorSingleton {
_addTranslation("Yes", "Sì");
_addTranslation("Cancel", "Annulla");
_addTranslation("UNEXPECTED ERROR!", "ERRORE INATTESO");
_addTranslation("It seems MegaBasterd is streaming video. Do you want to exit?", "Sembra Mche egaBasterd è in streaming video.\nVuoi uscire?");
_addTranslation("It seems MegaBasterd is provisioning down/uploads.\n\nIf you exit now, unprovisioned down/uploads will be lost.\n\nDo you want to continue?", "Sembra che MegaBasterd stia effettuando il provisioning/upload.\n\nSe esci ora, unprovisioned/upload andranno persi.\n\nVuoi continuare?");
_addTranslation("It seems MegaBasterd is streaming video. Do you want to exit?", "Sembra che MegaBasterd è in streaming video.\nVuoi uscire?");
_addTranslation("It seems MegaBasterd is provisioning down/uploads.\n\nIf you exit now, unprovisioned down/uploads will be lost.\n\nDo you want to continue?", "Sembra che MegaBasterd stia effettuando il provisioning/upload.\n\nSe esci ora, l'unprovisioned/upload andranno persi.\n\nVuoi continuare?");
_addTranslation("It seems MegaBasterd is just finishing uploading some files.\n\nIF YOU EXIT NOW, THOSE UPLOADS WILL FAIL.\n\nDo you want to continue?", "Sembra che MegaBasterd stia finendo di caricare alcuni file.\n\nSE ESCI ORA, Quei CARICAMENTI FALLIRANNO.\n\nVuoi continuare?");
_addTranslation("All your current settings and accounts will be deleted after import. (It is recommended to export your current settings before importing). \n\nDo you want to continue?", "Tutte le impostazioni e gli account attuali verranno eliminati dopo l'importazione (ti consigliamo di esportare le impostazioni attuali prima di importare quelle nuove).\n\nVuoi continuare?");
_addTranslation("Only SAVED settings and accounts will be exported. (If you are unsure, it is better to save your current settings and then export them).\n\nDo you want to continue?", "Verranno esportate solo le impostazioni e gli account SALVATI (se non sei sicuro, è meglio salvare le impostazioni attauli e quindi esportarle).\n\nVuoi continuare?");
_addTranslation("Master password will be reset and all your accounts will be removed. (THIS CAN'T BE UNDONE)\n\nDo you want to continue?", "La password principale verrà reimpostata e tutti i tuoi account verranno rimossi (L'OPERAZIONE NON PUÒ ESSERE ANNULLATA).\n\nVuoi continuare?");
_addTranslation("ALL YOUR SETTINGS, ACCOUNTS AND TRANSFERENCES WILL BE REMOVED. (THIS CAN'T BE UNDONE)\n\nDo you want to continue?", "TUTTE LE IMPOSTAZIONI, GLI ACCOUNT E I TRASFERIMENTI VERRANNO RIMOSSI (L'OPERAZION NON PUÒ ESSERE ANNULLATA).\n\nVuoi continuare?");
_addTranslation("ALL YOUR SETTINGS, ACCOUNTS AND TRANSFERENCES WILL BE REMOVED. (THIS CAN'T BE UNDONE)\n\nDo you want to continue?", "Tutte e informazioni, gli acoount e i trasferimenti verranno rimossi (l'operazione non può essere annullata).\n\nVuoi continuare?");
_addTranslation("Remove all no running downloads?", "Vuoi rimuovere tutti i download non in esecuzione?");
_addTranslation("Warning!", "Attenzione!");
_addTranslation("Remove all no running uploads?", "Vuoi rimuovere tutti gli upload non in esecuzione?");
@ -234,21 +234,21 @@ public class LabelTranslatorSingleton {
_addTranslation("Account:", "Account:");
_addTranslation("Folder link detected!", "Rilevato collegamento cartella!");
_addTranslation("File already exists!", "Il file esiste già!");
_addTranslation("Megabasterd is stopping transferences safely, please wait...", "Megabasterd sta fermando i trasferimenti in sicurezza. Attendi...");
_addTranslation("MegaBasterd is stopping transferences safely, please wait...", "MegaBasterd sta fermando i trasferimenti in sicurezza. Attendi...");
_addTranslation("Put your MEGA/MegaCrypter/ELC link/s here (one per line):", "Incolla qui il collegamento MEGA/MegaCrypter/ELC (uno per riga):");
_addTranslation("Download folder:", "Cartella download:");
_addTranslation("Split size (MBs):", "Dim,. suddivisione (MB):");
_addTranslation("File successfully splitted!", "");
_addTranslation("File successfully splitted!", "Divisione file completata");
_addTranslation("File successfully merged!", "Unione file completata!");
_addTranslation("File successfuly downloaded!", "Download file completato!");
_addTranslation("Download paused!", "Download in pausa!");
_addTranslation("Downloading file from mega ...", "Download file da Mega...");
_addTranslation("Copy link", "Copia collegamento");
_addTranslation("Downloading file from mega ", "Download file da Mega");
_addTranslation("EXIT NOW", "ESCI ORA");
_addTranslation("Download CANCELED!", "Download ANNULLATO");
_addTranslation("Upload CANCELED!", "Upload ANNULLATO");
_addTranslation("Uploading file to mega (", "Uplaod file su Mega");
_addTranslation("EXIT NOW", "Esci ora");
_addTranslation("Download CANCELED!", "Download annullato");
_addTranslation("Upload CANCELED!", "Upload annullato");
_addTranslation("Uploading file to mega (", "Upload file su Mega");
_addTranslation("Put your MEGA/MegaCrypter/ELC link here in order to get a streaming link:", "Per ottenere un collegamento streaming Inserisci qui il collegamento MEGA/MegaCrypter/ELC:");
_addTranslation("Use this account for streaming:", "Per lo streaming usa questo account:");
_addTranslation("Use this account for download:", "Per il download usa questo account:");
@ -259,33 +259,33 @@ public class LabelTranslatorSingleton {
_addTranslation("Stopping upload safely before exit MegaBasterd, please wait...", "Arresto upload in modo sicuro prima di uscire da MegaBasterd. Attendi...");
_addTranslation("Starting download, please wait...", "Avvio download. Attendi...");
_addTranslation("Starting upload, please wait...", "Avvio upload. Attendi...");
_addTranslation("Starting download (retrieving MEGA temp link), please wait...", "Avvio download (recupero collegamento temporaneo MEGA). Attendi...");
_addTranslation("Starting download (retrieving MEGA temp link), please wait...", "Avvio download (recupero collegamento temporaneo Mega). Attendi...");
_addTranslation("File exists, resuming download...", "Il file esiste. Ripresa download...");
_addTranslation("Truncating temp file...", "Troncamento file temporaneo...");
_addTranslation("Waiting to check file integrity...", "In attesa verifica integrità del file...");
_addTranslation("Checking file integrity, please wait...", "Controllo integrità del file...");
_addTranslation("Provisioning download, please wait...", "Provisioning download..");
_addTranslation("Waiting to start...", "In attesa dell'avvio...");
_addTranslation("Provisioning upload, please wait...", "Provisioning uplaod...");
_addTranslation("Provisioning upload, please wait...", "Provisioning upload...");
_addTranslation("Waiting to start (", "In attesa dell'avvio (");
_addTranslation("Creating new MEGA node ... ***DO NOT EXIT MEGABASTERD NOW***", "Creazione nuovo nodo MEGA (***NON USCIRE DA MEGABASTERD ORA***");
_addTranslation("Creating new MEGA node ... ***DO NOT EXIT MEGABASTERD NOW***", "Creazione nuovo nodo Mega (*** non uscire da MegaBasterd ora ***)...");
_addTranslation("File successfully uploaded! (", "Upload file completato! (");
_addTranslation("PAUSE ALL", "PAUSA TUTTO");
_addTranslation("RESUME ALL", "RIPRENDI TUTTO");
_addTranslation("MEGA folder link was copied to clipboard!", "Il collegamento cartella MEGA è stato copiato negli Appunti!");
_addTranslation("MEGA file link was copied to clipboard!", "Il collegamento file MEGA è stato copiato negli Appunti!");
_addTranslation("MEGA file link was copied to clipboard!", "Il collegamento file Mega è stato copiato negli Appunti!");
_addTranslation("Pausing download ...", "Pausa download...");
_addTranslation("Pausing upload ...", "Pausa upload ");
_addTranslation("File successfully downloaded! (Integrity check PASSED)", "Download file completato (controllo di integrità PASSATO)!");
_addTranslation("File successfully downloaded! (but integrity check CANCELED)", "Download file completato (ma controllo di integrità ANNULLATO)!");
_addTranslation("File successfully downloaded! (Integrity check PASSED)", "Download file completato (controllo di integrità completato)!");
_addTranslation("File successfully downloaded! (but integrity check CANCELED)", "Download file completato (ma controllo di integrità annullato)!");
_addTranslation("UPLOAD FAILED! (Empty completion handler!)", "UPLOAD NON RIUSCITO (gestore completamento vuoto)!");
_addTranslation("UPLOAD FAILED: too many errors", "UPLOAD NON RIUSCITO: troppi errori");
_addTranslation("UPLOAD FAILED: FATAL ERROR", "UPLOAD NON RIUSCITO: ERRORE FATALE");
_addTranslation("BAD NEWS :( File is DAMAGED!", "CATTIVE NOTIZIE: (il file è DANNEGGIATO!");
_addTranslation("MEGA LINK TEMPORARILY UNAVAILABLE!", "COLLEGAMENTO MEGA TEMPORANEAMENTE NON DISPONIBILE!");
_addTranslation("File temporarily unavailable! (Retrying in ", "File temporaneamente non disponibile! (ritentativo tra ");
_addTranslation("UPLOAD FAILED: FATAL ERROR", "Upload fallito: errore fatale");
_addTranslation("BAD NEWS :( File is DAMAGED!", "Errore: il file è danneggiato!");
_addTranslation("MEGA LINK TEMPORARILY UNAVAILABLE!", "Collegamento Mega temporaneamente non disponibile!");
_addTranslation("File temporarily unavailable! (Retrying in ", "File temporaneamente non disponibile! (nuovo tentativo tra ");
_addTranslation(" secs...)", " sec...");
_addTranslation(" (Retrying in ", "(Ritentativo tra");
_addTranslation(" (Retrying in ", "(Nuovo tentativo tra");
_addTranslation("Proxy settings", "Impostazioni proxy");
_addTranslation("Authentication", "Autenticazione");
_addTranslation("Upload info", "Info upload");
@ -296,19 +296,31 @@ public class LabelTranslatorSingleton {
_addTranslation("Checking if there are previous downloads, please wait...", "Verifica se ci sono download precedenti...");
_addTranslation("Checking if there are previous uploads, please wait...", "Verifica se ci sono upload precedenti...");
_addTranslation("Restore window", "Ripristina finestra");
_addTranslation("EXIT", "ESCI");
_addTranslation("EXIT", "Esci");
_addTranslation("File successfully downloaded!", "Download file completato!");
_addTranslation("Quota used: ", "Quota suata: ");
_addTranslation("Streaming server: ON (port ", "server streaming: ON (porta ");
_addTranslation("Quota used: ", "Quota usata: ");
_addTranslation("Streaming server: ON (port ", "Server streaming: ON (porta ");
_addTranslation("MC reverse mode: ON (port ", "Modo inverso MC: ON (porta ");
_addTranslation("Joining file chunks, please wait...", "Unione segmenti file...");
_addTranslation("Close MegaBasterd when all transfers finish", "Chiudi MegaBasterd quando tutti i trasferimenti sono stati completati");
_addTranslation("Use custom temporary directory for chunks storage", "Usa cartella temporanea personalizzata per archiviazione segmenti");
_addTranslation("English", " Inglesee");
_addTranslation("Close MegaBasterd when all transfers finish", "Chiudi MegaBasterd a trasferimenti completati");
_addTranslation("Use custom temporary directory for chunks storage", "Per archiviazione segmenti usa cartella temporanea personalizzata");
_addTranslation("CANCEL ALL DOWNLOADS", "Annulla tutti i download");
_addTranslation("Save debug info to file", "Salva info debug nel file");
_addTranslation("Use this proxy list Format is [*]IP:PORT[@user_b64:password_b64]", "Il formato per l'elenco proxy è []IP:PORT[@user_b64:password_b64)");
_addTranslation("Slots", "Slot");
_addTranslation("MC reverse mode: OFF", "Modo MC inverso: OFF");
_addTranslation("Pre:", "In preparazione:");
_addTranslation("Pro:", "Pro:");
_addTranslation("Wait:", "In attesa:");
_addTranslation("Run:", "In download:");
_addTranslation("Finish:", "Completati:");
_addTranslation("Rem:", "Rem:");
_addTranslation("English", "Inglese");
_addTranslation("Spanish", "Spagnolo");
_addTranslation("Italian", "Italiano");
_addTranslation("Turkish", "Turco");
_addTranslation("Chinese", "Cinese");
}
private void Chinese() {
@ -319,10 +331,12 @@ public class LabelTranslatorSingleton {
_addTranslation("WARNING: USING MEGA API WITHOUT API KEY MAY VIOLATE ITS TERM OF USE.\n\nYOU SHOULD GET A KEY -> https://mega.nz/sdk (and set it in MegaBasterd ADVANCED SETTINGS).\n\nCREATE API KEY NOW?", "警告: 在没有 API 密钥的情况下使用 MEGA API 可能会违反其使用条款. API 密钥获取地址 -> https://mega.nz/sdk");
_addTranslation("WARNING: Using proxies or VPN to bypass MEGA's daily download limitation may violate its Terms of Use. USE THIS OPTION AT YOUR OWN RISK.", "警告: 在没有 API 密钥的情况下使用 MEGA API 可能会违反其使用条款.\n\nAPI 密钥获取地址 -> https://mega.nz/sdk (并在 MegaBasterd 高级设置中进行设置).\n\n立即创建 API 密钥?");
_addTranslation("Using proxies or VPN to bypass MEGA's daily download limitation may violate its Terms of Use.\n\nUSE THIS OPTION AT YOUR OWN RISK.", "警告: 使用代理或 VPN 绕过 MEGA 的每日下载限制可能违反其使用条款. 使用此选项需您自担风险.");
_addTranslation("Execute this command when MEGA download limit is reached:", "达到 MEGA 下载限制时执行此命令:");
_addTranslation("Use this proxy list (instead of the one included in MegaBasterd) Format is [*]IP:PORT[@user_b64:password_b64]", "使用此代理列表 (而不是 MegaBasterd 中包含的那个) 格式为 [*]IP:PORT[@user_b64:password_b64]");
_addTranslation("Waiting for completion handler ... ***DO NOT EXIT MEGABASTERD NOW***", "等待完成处理程序 ... ***不要退出 MEGABASTERD***");
_addTranslation("Finishing calculating CBC-MAC code (this could take a while) ... ***DO NOT EXIT MEGABASTERD NOW***", "完成计算CBC-MAC码 (可能需要一段时间) ... ***不要退出 MEGABASTERD***");
_addTranslation("Split content in different uploads", "上传中的拆分内容");
_addTranslation("Merge content in the same upload", "上传中的合并内容");
_addTranslation("Split content in different uploads", "拆分上传内容");
_addTranslation("Merge content in the same upload", "合并上传内容");
_addTranslation("How do you want to proceed?", "请选择上传方式?");
_addTranslation("Put on TOP of waiting queue", "置顶等待队列");
_addTranslation("TOP", "置顶");
@ -330,6 +344,7 @@ public class LabelTranslatorSingleton {
_addTranslation("Freeze transferences before start", "开始前暂停传输");
_addTranslation("UNFREEZE WAITING TRANSFERENCES", "取消暂停传输");
_addTranslation("(FROZEN) Waiting to start...", "(暂停) 等待开始...");
_addTranslation("(FROZEN) Waiting to start (", "(暂停) 等待开始");
_addTranslation("There are a lot of files in this folder.\nNot all links will be provisioned at once to avoid saturating MegaBasterd", "这个文件夹里有很多文件.\n并非所有链接都将立即提供以避免使 MegaBasterd 饱和");
_addTranslation("You've tried to login too many times. Wait an hour.", "您尝试登录太多次. 等一个小时.");
_addTranslation("MEGA LINK ERROR!", "MEGA 链接错误!");
@ -338,7 +353,7 @@ public class LabelTranslatorSingleton {
_addTranslation("Font:", "字体:");
_addTranslation("Loading...", "正在加载...");
_addTranslation("DEFAULT", "默认");
_addTranslation("ALTERNATIVE", "选择");
_addTranslation("ALTERNATIVE", "其他");
_addTranslation("Download latest version", "下载最新版本");
_addTranslation("PROVISION FAILED", "下载失败");
_addTranslation("Error registering download: file is already downloading.", "注册下载时出错: 文件已在下载.");
@ -348,9 +363,9 @@ public class LabelTranslatorSingleton {
_addTranslation("Checking your MEGA accounts, please wait...", "检查您的 MEGA 帐户, 请稍等...");
_addTranslation("Check for updates", "检查更新");
_addTranslation("Checking, please wait...", "检查中, 请稍等...");
_addTranslation("You have the latest version ;)", "有最新版本 ;)");
_addTranslation("You have the latest version ;)", "有最新版本 ");
_addTranslation("Copy MegaBasterd download URL", "复制 MegaBasterd 下载 URL");
_addTranslation("Made with love (and with no warranty) by tonikelope.", "不知道.");
_addTranslation("Made with love (and with no warranty) by tonikelope.", "Tonikelope 编译构建(没有保证).");
_addTranslation("Yet another unofficial (and ugly) cross-platform MEGA downloader/uploader/streaming suite.", "官方 (and ugly) 跨平台的 MEGA 下载器/上传者/流媒体套件.");
_addTranslation("MEGA URL was copied to clipboard!", "MEGA URL 已复制到剪贴板!");
_addTranslation("MegaBasterd NEW VERSION is available! -> ", "MegaBasterd 新版本可用! -> ");
@ -409,8 +424,8 @@ public class LabelTranslatorSingleton {
_addTranslation("MERGING FILE...", "合并文件...");
_addTranslation("Checking MEGA account...", "检查 MEGA 帐户...");
_addTranslation("SAVE", "保存");
_addTranslation("New download", "新下载");
_addTranslation("New upload", "新上传");
_addTranslation("New download", "新下载");
_addTranslation("New upload", "新上传");
_addTranslation("New streaming", "新增流媒体");
_addTranslation("Split file", "拆分文件");
_addTranslation("Merge file", "合并文件");
@ -445,7 +460,7 @@ public class LabelTranslatorSingleton {
_addTranslation("Font ZOOM (%):", "字体 缩放 (%):");
_addTranslation("Note: MegaBasterd will use this proxy for ALL connections.", "注意: MegaBasterd 将使用此代理进行所有连接.");
_addTranslation("Port:", "端口:");
_addTranslation("Settings successfully saved!", "保存设置成功!");
_addTranslation("Settings successfully saved!", "设置保存成功!");
_addTranslation("Settings successfully imported!", "导入设置成功!");
_addTranslation("Settings successfully exported!", "导出设置成功!");
_addTranslation("Settings successfully reset!", "重置设置成功!");
@ -495,7 +510,7 @@ public class LabelTranslatorSingleton {
_addTranslation("File already exists!", "文件已存在!");
_addTranslation("Megabasterd is stopping transferences safely, please wait...", "Megabasterd 正在安全地停止转移, 请稍等...");
_addTranslation("Put your MEGA/MegaCrypter/ELC link/s here (one per line):", "请输入 MEGA/MegaCrypter/ELC 链接 (每行一个):");
_addTranslation("Download folder:", "下载文件夹:");
_addTranslation("Download folder:", "下载目录:");
_addTranslation("Split size (MBs):", "分割尺寸 (MBs):");
_addTranslation("File successfully splitted!", "文件拆分成功!");
_addTranslation("File successfully merged!", "文件合并成功!");
@ -562,7 +577,23 @@ public class LabelTranslatorSingleton {
_addTranslation("MC reverse mode: ON (port ", "MC 反向模式: ON (端口 ");
_addTranslation("Joining file chunks, please wait...", "加入文件块, 请稍等...");
_addTranslation("Close MegaBasterd when all transfers finish", "所有传输完成后关闭 MegaBasterd");
_addTranslation("Use custom temporary directory for chunks storage", "使用自定义临时目录进行块存储");
_addTranslation("Use custom temporary directory for chunks storage", "使用自定义临时目录进行存储");
_addTranslation("CANCEL ALL DOWNLOADS", "取消所有下载");
_addTranslation("Save debug info to file", "将调试信息保存为");
_addTranslation("Use this proxy list Format is [*]IP:PORT[@user_b64:password_b64]", "使用此代理列表格式为 [*]IP:PORT[@user_b64:password_b64]");
_addTranslation("Slots", "线程");
_addTranslation("MC reverse mode: OFF", "MC反向模式OFF");
_addTranslation("Pre:", "预:");
_addTranslation("Pro:", "Pro:");
_addTranslation("Wait:", "等待:");
_addTranslation("Run:", "下载中:");
_addTranslation("Finish:", "完成:");
_addTranslation("Rem:", "Rem:");
_addTranslation("English", "English");
_addTranslation("Spanish", "Spanish");
_addTranslation("Italian", "Italian");
_addTranslation("Chinese", "Chinese");
_addTranslation("Turkish", "Turkish");
}
private void Turkish() {
@ -651,7 +682,7 @@ public class LabelTranslatorSingleton {
_addTranslation("RESUME UPLOAD", "YÜKLEMEYE DEVAM ET");
_addTranslation("Limit upload speed", "Yükleme hızını sınırla");
_addTranslation("CANCEL", "İPTAL");
_addTranslation("Use multi slot download mode", "Çoklu(RAM)indirme modunu kullan");
_addTranslation("Use multi slot download mode", "Çoklu indirme modunu kullan");
_addTranslation("Selecting file...", "Dosya seçiliyor....");
_addTranslation("Copy folder link", "Klasör bağlantısını kopyala");
_addTranslation("Limit download speed", "indirme hızını sınırla");
@ -660,7 +691,7 @@ public class LabelTranslatorSingleton {
_addTranslation("Load DLC container", "DLC kapsayıcısını yükle");
_addTranslation("Adding folder, please wait...", "Klasör ekleniyor, lütfen bekleyin...");
_addTranslation("PAUSE UPLOAD", "YÜKLEMEYİ DURAKLAT");
_addTranslation("CANCEL CHECK", "KONTROL ETME İPTAL");
_addTranslation("CANCEL CHECK", "KONTROL ETME İPTAL ET");
_addTranslation("Keep temp file", "Geçici dosyayı tut");
_addTranslation("Use HTTP(S) PROXY", "HTTP(S) PROXY kullanın");
_addTranslation("MERGING FILE...", "DOSYA BİRLEŞTİRİLİYOR...");
@ -674,15 +705,15 @@ public class LabelTranslatorSingleton {
_addTranslation("Remove all no running downloads", "Çalışan tüm indirmeleri kaldır");
_addTranslation("Remove all no running uploads", "Çalışan tüm yüklemeleri kaldır");
_addTranslation("Edit", "Düzenle");
_addTranslation("Settings", "Ayaralr");
_addTranslation("Settings", "Ayarlar");
_addTranslation("Help", "Yardım");
_addTranslation("About", "Hakkında");
_addTranslation("About", "Hakkında & Türkçe çeviri: FabSec; By Fabriel");
_addTranslation("Remember for this session", "Bu oturum için hatırla");
_addTranslation("Restore folder data", "Klasörü geri yükle");
_addTranslation("Restoring data, please wait...", "Veriler geri yükleniyor, lütfen bekleyin...");
_addTranslation("File", "Dosya");
_addTranslation("Hide to tray", "Tepsiye gizle");
_addTranslation("Clear finished", "Temizle tamamlandı");
_addTranslation("Clear finished", "indirilenleri listeden temizle");
_addTranslation("Exit", ıkış");
_addTranslation("Default slots per file:", "Dosya başına varsayılan slot:");
_addTranslation("Note: if you want to download without using a MEGA PREMIUM account you SHOULD enable it. (Slots consume RAM, so use them moderately).", "Not: Bir MEGA PREMIUM hesabı kullanmadan indirmek istiyorsanız, onu etkinleştirmeniz GEREKİR. (RAM tüketir, bu nedenle bu ayarı dengeli kullanın).");
@ -694,7 +725,7 @@ public class LabelTranslatorSingleton {
_addTranslation("Max parallel downloads:", "Maksimum paralel indirme:");
_addTranslation("Max parallel uploads:", "Maksimum paralel yükleme:");
_addTranslation("Note: slots consume RAM, so use them moderately.", "Not: RAM tüketir, bu nedenle bu ayarı dengeli kullanın.");
_addTranslation("Note: you can use a (optional) alias for your email addresses -> bob@supermail.com#bob_mail (don't forget to save after entering your accounts).", "Not: E-posta adresleriniz için (isteğe bağlı) bir takma ad kullanabilirsiniz -> bob@supermail.com#bob_mail (hesaplarınızı girdikten sonra kaydetmeyi unutmayın).");
_addTranslation("Note: you can use a (optional) alias for your email addresses -> bob@supermail.com#bob_mail (don't forget to save after entering your accounts).", "Not: E-posta adresleriniz için (isteğe bağlı) bir takma ad kullanabilirsiniz -> fabriel@supermail.com#fabriel_mail (hesaplarınızı girdikten sonra kaydetmeyi unutmayın).");
_addTranslation("Your MEGA accounts:", "MEGA hesaplarınız:");
_addTranslation("Your ELC accounts:", "ELC hesaplarınız:");
_addTranslation("Note: restart required.", "Not: yeniden başlatma gerekli.");
@ -741,7 +772,7 @@ public class LabelTranslatorSingleton {
_addTranslation("Uploads", "Yüklemeler");
_addTranslation("Accounts", "Hesaplar");
_addTranslation("Advanced", "Gelişmiş");
_addTranslation("Language:", "Dil:");
_addTranslation("Language:", "Diller:");
_addTranslation("Loading files, please wait...", "Dosyalar yükleniyor, lütfen bekleyin...");
_addTranslation("Checking account quota, please wait...", "Hesap kotası kontrol ediliyor, lütfen bekleyin...");
_addTranslation("ERROR checking account quota!", "HATA hesap kotası kontrol ediliyor!");
@ -812,7 +843,7 @@ public class LabelTranslatorSingleton {
_addTranslation("Checking if there are previous downloads, please wait...", "Daha önce indirme olup olmadığı kontrol ediliyor, lütfen bekleyin...");
_addTranslation("Checking if there are previous uploads, please wait...", "Daha önce yükleme olup olmadığı kontrol ediliyor, lütfen bekleyin...");
_addTranslation("Restore window", "Pencereyi geri yükle");
_addTranslation("EXIT", "ÇIKIŞ");
_addTranslation("EXIT", "UYGULAMAYI KAPAT");
_addTranslation("File successfully downloaded!", "Dosya başarıyla indirildi!");
_addTranslation("Quota used: ", "Kullanılan kota: ");
_addTranslation("Streaming server: ON (port ", "Akış sunucusu: AÇIK (bağlantı noktası ");
@ -820,6 +851,17 @@ public class LabelTranslatorSingleton {
_addTranslation("Joining file chunks, please wait...", "Dosya parçaları birleştiriliyor, lütfen bekleyin...");
_addTranslation("Close MegaBasterd when all transfers finish", "Tüm transferler bittiğinde MegaBasterd'ı kapatın");
_addTranslation("Use custom temporary directory for chunks storage", "Birleştirmeler için özel geçici depolama dizini kullanın");
_addTranslation("CANCEL ALL DOWNLOADS", "TÜM İNDİRMELERİ İPTAL ET");
_addTranslation("Save debug info to file", "Hata ayıklama bilgilerini dosyaya kaydet");
_addTranslation("Use this proxy list Format is [*]IP:PORT[@user_b64:password_b64]", "Bu proxy biçim listesini kullan: [*]IP:PORT[@user_b64:password_b64]");
_addTranslation("Slots", "Slot");
_addTranslation("MC reverse mode: OFF", "Ters MC modu: KAPALI");
_addTranslation("Pre:", "Hazırlık aşamasında:");
_addTranslation("Pro:", "Pro:");
_addTranslation("Wait:", "Bekleme aşamasında:");
_addTranslation("Run:", "indirme aşamasında:");
_addTranslation("Finish:", "Tamamlandı:");
_addTranslation("Rem:", "Rem:");
_addTranslation("English", "İngilizce");
_addTranslation("Spanish", "İspanyolca");
_addTranslation("Italian", "İtalyan");
@ -1083,6 +1125,12 @@ public class LabelTranslatorSingleton {
_addTranslation("Joining file chunks, please wait...", "Juntando chunks, por favor espera...");
_addTranslation("Close MegaBasterd when all transfers finish", "Cerrar MegaBasterd cuando todas las transferencias terminen");
_addTranslation("Use custom temporary directory for chunks storage", "Usar un directorio temporal personalizado para almacenar los chunks");
_addTranslation("Pre:", "Pre:");
_addTranslation("Pro:", "Cargando:");
_addTranslation("Wait:", "Espera:");
_addTranslation("Run:", "Transf:");
_addTranslation("Finish:", "Fin:");
_addTranslation("Rem:", "Pend:");
_addTranslation("English", "Inglés");
_addTranslation("Spanish", "Español");
_addTranslation("Italian", "Italiano");

View File

@ -58,7 +58,7 @@ import javax.swing.UIManager;
*/
public final class MainPanel {
public static final String VERSION = "7.54";
public static final String VERSION = "7.55";
public static final boolean FORCE_SMART_PROXY = false; //TRUE FOR DEBUGING SMART PROXY
public static final int THROTTLE_SLICE_SIZE = 16 * 1024;
public static final int DEFAULT_BYTE_BUFFER_SIZE = 16 * 1024;

View File

@ -660,9 +660,6 @@
</Container>
<Component class="javax.swing.JButton" name="unfreeze_transferences_button">
<Properties>
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="ff" green="ff" red="ff" type="rgb"/>
</Property>
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
<Font name="Dialog" size="24" style="1"/>
</Property>

View File

@ -720,7 +720,6 @@ public final class MainPanelView extends javax.swing.JFrame {
jTabbedPane1.addTab("Uploads", new javax.swing.ImageIcon(getClass().getResource("/images/icons8-upload-to-ftp-30.png")), uploads_panel); // NOI18N
unfreeze_transferences_button.setBackground(new java.awt.Color(255, 255, 255));
unfreeze_transferences_button.setFont(new java.awt.Font("Dialog", 1, 24)); // NOI18N
unfreeze_transferences_button.setForeground(new java.awt.Color(0, 153, 255));
unfreeze_transferences_button.setText("UNFREEZE WAITING TRANSFERENCES");

View File

@ -468,7 +468,7 @@ public class MegaAPI implements Serializable {
} else {
try (InputStream is = con.getInputStream(); ByteArrayOutputStream byte_res = new ByteArrayOutputStream()) {
try ( InputStream is = con.getInputStream(); ByteArrayOutputStream byte_res = new ByteArrayOutputStream()) {
byte[] buffer = new byte[MainPanel.DEFAULT_BYTE_BUFFER_SIZE];

View File

@ -72,7 +72,7 @@ public class MegaCrypterAPI {
} else {
try (InputStream is = con.getInputStream(); ByteArrayOutputStream byte_res = new ByteArrayOutputStream()) {
try ( InputStream is = con.getInputStream(); ByteArrayOutputStream byte_res = new ByteArrayOutputStream()) {
byte[] buffer = new byte[MainPanel.DEFAULT_BYTE_BUFFER_SIZE];

View File

@ -102,7 +102,7 @@ public class MiscTools {
public static void deleteDirectoryRecursion(Path path) throws IOException {
if (Files.isDirectory(path, LinkOption.NOFOLLOW_LINKS)) {
try (DirectoryStream<Path> entries = Files.newDirectoryStream(path)) {
try ( DirectoryStream<Path> entries = Files.newDirectoryStream(path)) {
for (Path entry : entries) {
deleteDirectoryRecursion(entry);
}
@ -1025,7 +1025,7 @@ public class MiscTools {
con.setUseCaches(false);
try (InputStream is = con.getInputStream(); ByteArrayOutputStream byte_res = new ByteArrayOutputStream()) {
try ( InputStream is = con.getInputStream(); ByteArrayOutputStream byte_res = new ByteArrayOutputStream()) {
byte[] buffer = new byte[MainPanel.DEFAULT_BYTE_BUFFER_SIZE];
@ -1079,7 +1079,7 @@ public class MiscTools {
con.setUseCaches(false);
try (InputStream is = con.getInputStream(); ByteArrayOutputStream byte_res = new ByteArrayOutputStream()) {
try ( InputStream is = con.getInputStream(); ByteArrayOutputStream byte_res = new ByteArrayOutputStream()) {
byte[] buffer = new byte[MainPanel.DEFAULT_BYTE_BUFFER_SIZE];
@ -1348,7 +1348,7 @@ public class MiscTools {
ByteArrayInputStream bs = new ByteArrayInputStream(CryptTools.aes_cbc_decrypt_pkcs7((byte[]) old_session_data.get("ma"), main_panel.getMaster_pass(), CryptTools.AES_ZERO_IV));
try (ObjectInputStream is = new ObjectInputStream(bs)) {
try ( ObjectInputStream is = new ObjectInputStream(bs)) {
old_ma = (MegaAPI) is.readObject();
@ -1360,7 +1360,7 @@ public class MiscTools {
ByteArrayInputStream bs = new ByteArrayInputStream((byte[]) old_session_data.get("ma"));
try (ObjectInputStream is = new ObjectInputStream(bs)) {
try ( ObjectInputStream is = new ObjectInputStream(bs)) {
old_ma = (MegaAPI) is.readObject();
} catch (Exception ex) {
unserialization_error = true;
@ -1401,7 +1401,7 @@ public class MiscTools {
ByteArrayOutputStream bs = new ByteArrayOutputStream();
try (ObjectOutputStream os = new ObjectOutputStream(bs)) {
try ( ObjectOutputStream os = new ObjectOutputStream(bs)) {
os.writeObject(ma);
}

View File

@ -2013,7 +2013,7 @@ public class SettingsDialog extends javax.swing.JDialog {
ByteArrayOutputStream bs = new ByteArrayOutputStream();
try (ObjectOutputStream os = new ObjectOutputStream(bs)) {
try ( ObjectOutputStream os = new ObjectOutputStream(bs)) {
os.writeObject(ma);
}
@ -2098,7 +2098,7 @@ public class SettingsDialog extends javax.swing.JDialog {
ByteArrayOutputStream bs = new ByteArrayOutputStream();
try (ObjectOutputStream os = new ObjectOutputStream(bs)) {
try ( ObjectOutputStream os = new ObjectOutputStream(bs)) {
os.writeObject(ma);
}
@ -2704,7 +2704,7 @@ public class SettingsDialog extends javax.swing.JDialog {
file.createNewFile();
try (BufferedOutputStream fos = new BufferedOutputStream(new FileOutputStream(file)); ObjectOutputStream oos = new ObjectOutputStream(fos)) {
try ( BufferedOutputStream fos = new BufferedOutputStream(new FileOutputStream(file)); ObjectOutputStream oos = new ObjectOutputStream(fos)) {
HashMap<String, Object> settings = new HashMap<>();
@ -2755,7 +2755,7 @@ public class SettingsDialog extends javax.swing.JDialog {
try {
try (InputStream fis = new BufferedInputStream(new FileInputStream(file)); ObjectInputStream ois = new ObjectInputStream(fis)) {
try ( InputStream fis = new BufferedInputStream(new FileInputStream(file)); ObjectInputStream ois = new ObjectInputStream(fis)) {
HashMap<String, Object> settings = (HashMap<String, Object>) ois.readObject();

View File

@ -166,7 +166,7 @@ public final class SmartMegaProxyManager {
con.setRequestProperty("User-Agent", MainPanel.DEFAULT_USER_AGENT);
try (InputStream is = con.getInputStream(); ByteArrayOutputStream byte_res = new ByteArrayOutputStream()) {
try ( InputStream is = con.getInputStream(); ByteArrayOutputStream byte_res = new ByteArrayOutputStream()) {
byte[] buffer = new byte[MainPanel.DEFAULT_BYTE_BUFFER_SIZE];

View File

@ -192,7 +192,7 @@ public class StreamChunkDownloader implements Runnable {
} else {
try (InputStream is = con.getInputStream()) {
try ( InputStream is = con.getInputStream()) {
int chunk_writes = 0;

View File

@ -682,7 +682,7 @@ abstract public class TransferenceManager implements Runnable, SecureSingleThrea
_main_panel.getTrayicon().displayMessage("MegaBasterd says:", "All your transferences have finished", TrayIcon.MessageType.INFO);
}
return (pre + prov + rem + wait + run + finish > 0) ? "Pre: " + pre + " / Pro: " + prov + " / Wait: " + wait + " / Run: " + run + " / Finish: " + finish + " / Rem: " + rem : "";
return (pre + prov + rem + wait + run + finish > 0) ? LabelTranslatorSingleton.getInstance().translate("Pre:") + " " + pre + " / " + LabelTranslatorSingleton.getInstance().translate("Pro:") + " " + prov + " / " + LabelTranslatorSingleton.getInstance().translate("Wait:") + " " + wait + " / " + LabelTranslatorSingleton.getInstance().translate("Run:") + " " + run + " / " + LabelTranslatorSingleton.getInstance().translate("Finish:") + " " + finish + " / " + LabelTranslatorSingleton.getInstance().translate("Rem:") + " " + rem : "";
}
private boolean _isOKFinishedInQueue() {

View File

@ -113,7 +113,7 @@ public class UploadMACGenerator implements Runnable, SecureSingleThreadNotifiabl
Cipher cryptor = genCrypter("AES", "AES/CBC/NoPadding", _upload.getByte_file_key(), i32a2bin(mac_iv));
try (BufferedInputStream is = new BufferedInputStream(new FileInputStream(_upload.getFile_name()))) {
try ( BufferedInputStream is = new BufferedInputStream(new FileInputStream(_upload.getFile_name()))) {
if (tot > 0) {
is.skip(tot);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 KiB

After

Width:  |  Height:  |  Size: 180 KiB