code: public static void iterate(File zip, String[] entryNames, ZipEntryCallback action, Charset charset) {
      ZipFile zf = null;
      try {
        if (charset == null) {
          zf = new ZipFile(zip);
        }
        else {
          zf = new ZipFile(zip, charset);
        }
  
        for (int i = 0; i < entryNames.length; i++) {
          ZipEntry e = zf.getEntry(entryNames[i]);
          if (e == null) {
            continue;
          }
          InputStream is = zf.getInputStream(e);
          try {
            action.process(is, e);
          }
          catch (IOException ze) {
            throw new ZipException("Failed to process zip entry '" + e.getName() + " with action " + action, ze);
          }
          catch (ZipBreakException ex) {
            break;
          }
          finally {
            IOUtils.closeQuietly(is);
          }
        }
      }
      catch (IOException e) {
        throw ZipExceptionUtil.rethrow(e);
      }
      finally {
        closeQuietly(zf);
      }
    }
docs: Reads the given ZIP file and executes the given action for each given entry.
  <p>
  For each given entry the corresponding input stream is also passed to the action. If you want to stop the loop then throw a ZipBreakException.
  
  @param zip
  input ZIP file.
  @param entryNames
  names of entries to iterate
  @param action
  action to be called for each entry.
  @param charset
  charset used to process the zip file
  
  @see ZipEntryCallback
  @see #iterate(File, String[], ZipInfoCallback)