code: public Jar addEntries(Path path, ZipInputStream zip, Filter filter) throws IOException {
          beginWriting();
          try (ZipInputStream zis = zip) {
              for (ZipEntry entry; (entry = zis.getNextEntry()) != null;) {
                  final String target = path != null ? path.resolve(entry.getName()).toString() : entry.getName();
                  if (target.equals(MANIFEST_NAME))
                      continue;
                  if (filter == null || filter.filter(target))
                      addEntryNoClose(jos, target, zis);
              }
          }
          return this;
      }
docs: Adds the contents of the zip/JAR contained in the given byte array to this JAR.
  
  @param path   the path within the JAR where the root of the zip will be placed, or {@code null} for the JAR's root
  @param zip    the contents of the zip/JAR file
  @param filter a filter to select particular classes
  @return {@code this}