code: public void finish() throws IOException {
          ensureOpen();
          if (finished) {
              return;
          }
          if (xentries.isEmpty()) {
              throw new ZipException("No entries");
          }
          if (current != null) {
              closeEntry();
          }
  
          // write central directory
          long off = written;
          for (XEntry xentry : xentries)
              writeCEN(xentry);
          writeEND(off, written - off);
          finished = true;
      }
docs: Finishes writing the contents of the ZIP output stream without closing
  the underlying stream. Use this method when applying multiple filters
  in succession to the same output stream.
  @exception ZipException if a ZIP file error has occurred
  @exception IOException if an I/O exception has occurred