code: public static void iterate(InputStream is, String[] entryNames, ZipEntryCallback action, Charset charset) {
      Set<String> namesSet = new HashSet<String>();
      for (int i = 0; i < entryNames.length; i++) {
        namesSet.add(entryNames[i]);
      }
      try {
        ZipInputStream in = null;
        try {
          in = newCloseShieldZipInputStream(is, charset);
          ZipEntry entry;
          while ((entry = in.getNextEntry()) != null) {
            if (!namesSet.contains(entry.getName())) {
              // skip the unnecessary entry
              continue;
            }
            try {
              action.process(in, entry);
            }
            catch (IOException ze) {
              throw new ZipException("Failed to process zip entry '" + entry.getName() + " with action " + action, ze);
            }
            catch (ZipBreakException ex) {
              break;
            }
          }
        }
        finally {
          if (in != null) {
            in.close();
          }
        }
      }
      catch (IOException e) {
        throw ZipExceptionUtil.rethrow(e);
      }
    }
docs: Reads the given ZIP stream 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 is
  input ZIP stream (it will not be closed automatically).
  @param entryNames
  names of entries to iterate
  @param action
  action to be called for each entry.
  @param charset
  charset to process entries in
  
  @see ZipEntryCallback
  @see #iterate(File, String[], ZipEntryCallback)