Skip to content

Commit

Permalink
3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
tonikelope committed Mar 25, 2018
1 parent fd342f1 commit 4698b44
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.tonikelope</groupId>
<artifactId>MegaBasterd</artifactId>
<version>3.7</version>
<version>3.8</version>
<packaging>jar</packaging>
<dependencies>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ public void run() {

} else {

byte[] buffer = new byte[THROTTLE_SLICE_SIZE];
byte[] buffer = new byte[DEFAULT_BYTE_BUFFER_SIZE];

int reads;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public void run() {

if (!isExit() && !getDownload().isStopped() && is != null) {

byte[] buffer = new byte[THROTTLE_SLICE_SIZE];
byte[] buffer = new byte[DEFAULT_BYTE_BUFFER_SIZE];

int reads;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public void run() {

f.seek(chunk.getOffset());

byte[] buffer = new byte[MainPanel.THROTTLE_SLICE_SIZE];
byte[] buffer = new byte[MainPanel.DEFAULT_BYTE_BUFFER_SIZE];

do {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public void run() {

f.seek(chunk.getOffset());

byte[] buffer = new byte[MainPanel.THROTTLE_SLICE_SIZE];
byte[] buffer = new byte[MainPanel.DEFAULT_BYTE_BUFFER_SIZE];

do {

Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/tonikelope/megabasterd/Download.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import static com.tonikelope.megabasterd.CryptTools.*;
import static com.tonikelope.megabasterd.DBTools.*;
import static com.tonikelope.megabasterd.MainPanel.*;
import java.io.BufferedInputStream;

/**
*
Expand Down Expand Up @@ -1173,7 +1174,7 @@ private boolean verifyFileCBCMAC(String filename) throws FileNotFoundException,

Cipher cryptor = genCrypter("AES", "AES/CBC/NoPadding", _chunkwriter.getByte_file_key(), i32a2bin(cbc_iv));

try (FileInputStream is = new FileInputStream(new File(filename))) {
try (BufferedInputStream is = new BufferedInputStream(new FileInputStream(filename))) {

long chunk_id = 1L;
long tot = 0L;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/tonikelope/megabasterd/MainPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
*/
public final class MainPanel {

public static final String VERSION = "3.7";
public static final String VERSION = "3.8";
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public void run() {

int reads, http_status;

byte[] buffer = new byte[THROTTLE_SLICE_SIZE];
byte[] buffer = new byte[DEFAULT_BYTE_BUFFER_SIZE];

StreamChunk chunk_stream = new StreamChunk(offset, _chunkwriter.calculateChunkSize(offset), url);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import javax.crypto.IllegalBlockSizeException;
import static com.tonikelope.megabasterd.CryptTools.*;
import static com.tonikelope.megabasterd.MiscTools.*;
import java.io.File;
import java.io.BufferedInputStream;
import java.io.FileInputStream;

/**
Expand Down Expand Up @@ -99,7 +99,7 @@ public void run() {

Cipher cryptor = genCrypter("AES", "AES/CBC/NoPadding", _upload.getByte_file_key(), i32a2bin(mac_iv));

try (FileInputStream is = new FileInputStream(new File(_upload.getFile_name()))) {
try (BufferedInputStream is = new BufferedInputStream(new FileInputStream(_upload.getFile_name()))) {

long chunk_id = 1L;
long tot = 0L;
Expand Down

0 comments on commit 4698b44

Please sign in to comment.