@@ -0,0 +1,1063 @@
+package ru.matevosyan;%0A%0Aimport java.io.File;%0Aimport java.io.FileInputStream;%0Aimport java.io.FileNotFoundException;%0Aimport java.io.IOException;%0Aimport java.util.Enumeration;%0Aimport java.util.zip.ZipEntry;%0Aimport java.util.zip.ZipFile;%0Aimport java.util.zip.ZipInputStream;%0A%0A/**%0A * Created for zipping file from archive.%0A * Created on 19.02.2017.%0A * @author Matevosyan Vardan%0A * @version 1.0%0A */%0A%0Apublic class zipWithStructure %7B%0A%0A    public void zipping(File file, String%5B%5D keys) throws IOException %7B%0A%0A        try (ZipInputStream zip = new ZipInputStream(new FileInputStream(file)); ZipFile zipFile = new ZipFile(file)) %7B%0A            ZipEntry entry;%0A            Enumeration entries = zipFile.entries();%0A            while (entries.hasMoreElements()) %7B%0A                entry = (ZipEntry) entries.nextElement();%0A                for (String key : keys) %7B%0A                    if (entry.getName().contains(%22.%22 + key)) %7B%0A%0A                    %7D%0A                %7D%0A            %7D%0A        %7D  catch (FileNotFoundException fnfe) %7B%0A            fnfe.getMessage();%0A        %7D%0A    %7D%0A%7D%0A

add zipWithStructure