// Path: javalab/src/main/java/com/smorales/javalab/business/NotRunnableCodeException.java
// public class NotRunnableCodeException extends RuntimeException {
// 
//     public NotRunnableCodeException(String message) {
//         super(message);
//     }
// 
//     public NotRunnableCodeException(Throwable cause) {
//         super(cause);
//     }
// 
//     public NotRunnableCodeException(String message, Throwable cause) {
//         super(message, cause);
//     }
// 
// }


import com.smorales.javalab.business.NotRunnableCodeException;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.List;
import java.util.stream.Collectors;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
        } catch (IOException e) {
            throw new NotRunnableCodeException("can not read zip file");
        }
    }

    private Path zipIt(Path folder, List<Path> fileList) {
        try {
            String zipFilename = folder + File.separator + ZIP_FILENAME;
            ZipOutputStream zOut = new ZipOutputStream(new FileOutputStream(zipFilename));

            for (Path f : fileList) {
                ZipEntry zipEntry = new ZipEntry(f.toString());
                zOut.putNextEntry(zipEntry);

                FileInputStream fIn = new FileInputStream(f.toString());

                int len;
                byte[] buffer = new byte[1024];
                while ((len = fIn.read(buffer)) > 0) {
                    zOut.write(buffer, 0, len);
                }

                fIn.close();
            }

            zOut.closeEntry();
            zOut.close();

            return Paths.get(zipFilename);
        } catch (IOException ex) {
// Path: javalab/src/main/java/com/smorales/javalab/business/NotRunnableCodeException.java
// public class NotRunnableCodeException extends RuntimeException {
// 
//     public NotRunnableCodeException(String message) {
//         super(message);
//     }
// 
//     public NotRunnableCodeException(Throwable cause) {
//         super(cause);
//     }
// 
//     public NotRunnableCodeException(String message, Throwable cause) {
//         super(message, cause);
//     }
// 
// }


// Path: javalab/src/main/java/com/smorales/javalab/business/files/Zipper.java
import com.smorales.javalab.business.NotRunnableCodeException;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.List;
import java.util.stream.Collectors;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;

        } catch (IOException e) {
            throw new NotRunnableCodeException("can not read zip file");
        }
    }

    private Path zipIt(Path folder, List<Path> fileList) {
        try {
            String zipFilename = folder + File.separator + ZIP_FILENAME;
            ZipOutputStream zOut = new ZipOutputStream(new FileOutputStream(zipFilename));

            for (Path f : fileList) {
                ZipEntry zipEntry = new ZipEntry(f.toString());
                zOut.putNextEntry(zipEntry);

                FileInputStream fIn = new FileInputStream(f.toString());

                int len;
                byte[] buffer = new byte[1024];
                while ((len = fIn.read(buffer)) > 0) {
                    zOut.write(buffer, 0, len);
                }

                fIn.close();
            }

            zOut.closeEntry();
            zOut.close();

            return Paths.get(zipFilename);
        } catch (IOException ex) {
            throw new NotRunnableCodeException("can not create zip file");