public static void zipFolderFiles() {
        for (int j = 0; j < folderList.size(); j++) {
            new File(folderList2.get(j)).mkdirs();
            String[] file = new File(folderList.get(j)).list();
            File temp = null;
            for (int i = 0; i < file.length; i++) {
                if (folderList.get(j).endsWith(File.separator)) {
                    temp = new File(folderList.get(j), file[i]);
                } else {
                    temp = new File(folderList.get(j), file[i]);
                }
                File zipFile = new File(folderList2.get(j), temp.getName() + ".zip");
                if (temp.isFile() && !zipFile.exists())
                    try {
                        fis = new FileInputStream(temp);
                        fos = new FileOutputStream(zipFile);
                        zipOut = new ZipOutputStream(fos);
                        ZipEntry entry = new ZipEntry(temp.getName());
                        zipOut.putNextEntry(entry);
                        int nNumber;
                        byte[] buffer = new byte[20480];
                        while ((nNumber = fis.read(buffer)) != -1)
                            zipOut.write(buffer, 0, nNumber);
                        zipOut.flush();
                    } catch (IOException e) {
                        continue;
                    } finally {
                        try {
                            zipOut.close();
                            fos.close();
                            fis.close();
                        } catch (IOException e) {
                        }
                    }
                else if (temp.isDirectory()) {
                    folderList.add(folderList.get(j) + File.separator + file[i]);
                    folderList2.add(folderList2.get(j) + File.separator + file[i]);
                }
            }
        }
    }