@@ -0,0 +1,1222 @@
+package fr.insee.eno.utils;%0A%0Aimport java.io.File;%0Aimport java.io.FileInputStream;%0Aimport java.io.FileNotFoundException;%0Aimport java.io.IOException;%0Aimport java.util.zip.ZipEntry;%0Aimport java.util.zip.ZipOutputStream;%0A%0Aimport org.apache.commons.io.IOUtils;%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A%0Apublic class FileArchiver %7B%0A%09%0A%09private static final Logger LOGGER = LoggerFactory.getLogger(FileArchiver.class);%0A%09%0A%09/**%0A     * Add a file into Zip archive.%0A     * %0A     * @param filePath%0A     * @param zipStream%0A     * @throws FileNotFoundException%0A     * @throws IOException%0A     */%0A    public static void writeToZipFile(String filePath, ZipOutputStream zipStream)%0A            throws FileNotFoundException, IOException %7B%0A    %09LOGGER.info(%22Writing file : '%22+filePath+ %22' to archive file.%22);%0A%0A        File file = new File(filePath);%0A%0A    %09LOGGER.info(%22Parent directory :%22+file.getParentFile().getName());%0A        FileInputStream fis = new FileInputStream(file);%0A        ZipEntry zipEntry = new ZipEntry(file.getParentFile().getName()+%22/%22+file.getName());%0A        zipStream.putNextEntry(zipEntry);%0A        zipStream.write(IOUtils.toByteArray(fis));%0A        zipStream.closeEntry();%0A        fis.close();%0A    %7D%0A%0A%7D%0A

Create FileArchiver.java