// Path: app/src/main/java/filelog/Log.java
// public class Log {
// 
//     private static final String token = " : ";
//     private static final long MAX_LEN = 300 * 1024;//50 Kb
// 
//     public static void d(String tag, String message) {
//         try {
//             boolean noClear;
//             File file = new File(Environment.getExternalStorageDirectory(), "log_j2meloader.txt");
//             if (file.length() > MAX_LEN) {
//                 noClear = false;
//             } else {
//                 noClear = true;
//             }
//             FileWriter fw = new FileWriter(file, noClear);
//             String msg = "\n" + new Date().toLocaleString() + token + tag + token + message;
//             fw.write(msg);
//             fw.flush();
//             fw.close();
//             //Log.d("L", msg);
//         } catch (IOException e) {
//             android.util.Log.e("L", "err in logging", e);
//         }
//     }
// }


import java.io.*;
import java.util.TreeMap;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
import filelog.Log;
            while ((zipEntry = zip.getNextEntry()) != null) {
                //long free = folderToUnzip.getFreeSpace();
                fileName = zipEntry.getName();
                final File outputFile = new File(folderToUnzip, fileName);
                outputFile.getParentFile().mkdirs();
                //Log.d("Unzip", "Zip entry: " + fileName + ", extract to: " + outputFile.getPath());
                if (fileName.endsWith("/")) {
                    //Log.d("Unzip", fileName+ " is directory");
                    outputFile.mkdirs();
                    continue;
                } else {
                    outputFile.createNewFile();
                    //if (zipEntry.getSize() == outputFile.length()) {
                    //    continue;
                    //}
                    //free = free - zipEntry.getSize() + outputFile.length();
                    //if (free < MIN_LOCAL_MEMORY) {
                        // error
                    //    return false;
                    //}
                    fos = new FileOutputStream(outputFile, false);
                    byte[] bytes = new byte[2048];
                    int c;
                    try {
                        while ((c = zip.read(bytes)) != -1) {
                            fos.write(bytes, 0, c);
                        }
                        fos.flush();
                        fos.close();
                    } catch (IOException e) {
// Path: app/src/main/java/filelog/Log.java
// public class Log {
// 
//     private static final String token = " : ";
//     private static final long MAX_LEN = 300 * 1024;//50 Kb
// 
//     public static void d(String tag, String message) {
//         try {
//             boolean noClear;
//             File file = new File(Environment.getExternalStorageDirectory(), "log_j2meloader.txt");
//             if (file.length() > MAX_LEN) {
//                 noClear = false;
//             } else {
//                 noClear = true;
//             }
//             FileWriter fw = new FileWriter(file, noClear);
//             String msg = "\n" + new Date().toLocaleString() + token + tag + token + message;
//             fw.write(msg);
//             fw.flush();
//             fw.close();
//             //Log.d("L", msg);
//         } catch (IOException e) {
//             android.util.Log.e("L", "err in logging", e);
//         }
//     }
// }


// Path: app/src/main/java/ua/naiksoftware/util/FileUtils.java
import java.io.*;
import java.util.TreeMap;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
import filelog.Log;

            while ((zipEntry = zip.getNextEntry()) != null) {
                //long free = folderToUnzip.getFreeSpace();
                fileName = zipEntry.getName();
                final File outputFile = new File(folderToUnzip, fileName);
                outputFile.getParentFile().mkdirs();
                //Log.d("Unzip", "Zip entry: " + fileName + ", extract to: " + outputFile.getPath());
                if (fileName.endsWith("/")) {
                    //Log.d("Unzip", fileName+ " is directory");
                    outputFile.mkdirs();
                    continue;
                } else {
                    outputFile.createNewFile();
                    //if (zipEntry.getSize() == outputFile.length()) {
                    //    continue;
                    //}
                    //free = free - zipEntry.getSize() + outputFile.length();
                    //if (free < MIN_LOCAL_MEMORY) {
                        // error
                    //    return false;
                    //}
                    fos = new FileOutputStream(outputFile, false);
                    byte[] bytes = new byte[2048];
                    int c;
                    try {
                        while ((c = zip.read(bytes)) != -1) {
                            fos.write(bytes, 0, c);
                        }
                        fos.flush();
                        fos.close();
                    } catch (IOException e) {
                        Log.d("Unzip", "IOErr in readFromStream (zip.read(bytes)): " + e.getMessage());