public static void main(String[] args) throws IOException {
        try(ZipInputStream in = new ZipInputStream(new FileInputStream(args[1]));
            ZipOutputStream out = new ZipOutputStream(new FileOutputStream(args[1]))){
            HashMap<String, byte[]> map = new HashMap<>();
            while (in.available()!=0){
                ZipEntry ent = in.getNextEntry();
                byte[] tmpArr = new byte[(int)ent.getSize()];
                int count = in.read(tmpArr);
                byte[] nex = new byte[count];
                System.arraycopy(tmpArr, 0, nex, 0, count);
                map.put(ent.getName(), nex);
                in.closeEntry();
            }

            Path adding = Paths.get(args[0]);

            out.putNextEntry(new ZipEntry(Paths.get("new",adding.getFileName().toString()).toString()));
            Files.copy(adding, out);
            out.closeEntry();

            for(Map.Entry<String, byte[]> ql: map.entrySet()){
                if(!Paths.get(ql.getKey()).getFileName().toString().equals(adding.getFileName().toString())){
                    out.putNextEntry(new ZipEntry(ql.getKey()));
                    out.write(ql.getValue());
                    out.flush();
                    out.closeEntry();
                }else{
                    out.putNextEntry(new ZipEntry(ql.getKey()));
                    Files.copy(adding, out);
                    out.closeEntry();
                }
            }
        }
    }