Buffer all file streams

This commit is contained in:
M66B
2019-01-16 13:42:17 +00:00
parent 9275b6e14f
commit 84fbfaf76e
5 changed files with 43 additions and 33 deletions

View File

@@ -54,6 +54,7 @@ import com.android.billingclient.api.BillingClient;
import com.google.android.material.bottomnavigation.BottomNavigationView;
import com.sun.mail.imap.IMAPStore;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.File;
@@ -588,9 +589,9 @@ public class Helper {
}
static void copy(File src, File dst) throws IOException {
InputStream in = new FileInputStream(src);
InputStream in = new BufferedInputStream(new FileInputStream(src));
try {
OutputStream out = new FileOutputStream(dst);
OutputStream out = new BufferedOutputStream(new FileOutputStream(dst));
try {
byte[] buf = new byte[4096];
int len;