code: public InputStream getInputStream(ZipEntry entry) throws IOException {
          if (entry == null) {
              throw new NullPointerException("entry");
          }
          long jzentry = 0;
          ZipFileInputStream in = null;
          synchronized (this) {
              ensureOpen();
              if (!zc.isUTF8() && (entry.flag & EFS) != 0) {
                  jzentry = getEntry(jzfile, zc.getBytesUTF8(entry.name), true);
              } else {
                  jzentry = getEntry(jzfile, zc.getBytes(entry.name), true);
              }
              if (jzentry == 0) {
                  return null;
              }
              in = new ZipFileInputStream(jzentry);
  
              switch (getEntryMethod(jzentry)) {
              case STORED:
                  synchronized (streams) {
                      streams.put(in, null);
                  }
                  return in;
              case DEFLATED:
                  // MORE: Compute good size for inflater stream:
                  long size = getEntrySize(jzentry) + 2; // Inflater likes a bit of slack
                  if (size > 65536) size = 8192;
                  if (size <= 0) size = 4096;
                  Inflater inf = getInflater();
                  InputStream is =
                      new ZipFileInflaterInputStream(in, inf, (int)size);
                  synchronized (streams) {
                      streams.put(is, inf);
                  }
                  return is;
              default:
                  throw new ZipException("invalid compression method");
              }
          }
      }
docs: Returns an input stream for reading the contents of the specified
  zip file entry.
  
  <p> Closing this ZIP file will, in turn, close all input
  streams that have been returned by invocations of this method.
  
  @param entry the zip file entry
  @return the input stream for reading the contents of the specified
  zip file entry.
  @throws ZipException if a ZIP format error has occurred
  @throws IOException if an I/O error has occurred
  @throws IllegalStateException if the zip file has been closed