Returns the response body of the HTTP method, if any, as an {@link InputStream}.
If response body is not available, returns <tt>null</tt>

@return InputStream    response body
@throws HttpException
180947
public InputStream getResponseBodyAsStream() throws HttpException {
    try {
      HttpEntity ent = getResponseEntity();

      if (ent == null) {
        return null;
      }

      return ent.getContent();
    } catch (Throwable t) {
      throw new HttpException(t.getLocalizedMessage(), t);
    }
  }
544025
public InputStream getInputStream()
    {
        InputStream stream=null;
        try
        {
            stream=this.commPort.getInputStream();
        }
        catch(IOException exception)
        {
            throw new FaxException("Unable to extract input stream.",exception);
        }
        
        return stream;
    }
1282889
public InputStream getInputStream() throws IOException {
    InputStream is = this.servletContext.getResourceAsStream(this.path);
    if (is == null) { throw new FileNotFoundException("Could not open " + getDescription()); }
    return is;
  }
155344
public static InputStream getRequestInputStream(ExternalContext ec)
            throws IOException
    {
        RequestType type = getRequestType(ec);
        if (type.isRequestFromClient())
        {
            Object req = ec.getRequest();
            if (type.isPortlet())
            {
                return (InputStream) _runMethod(req, "getPortletInputStream");
            }
            else
            {
                return ((ServletRequest) ec.getRequest()).getInputStream();
            }
        }

        return null;
    }
400835
@Override
    public InputStream getInputStream() throws IOException {
        try {
            InputStream result = entry.adapt(InputStream.class);
            if (result == null) {
                throw new IOException("The entry did not supply an input stream: " + entry);
            }
            return result;
        } catch (UnableToAdaptException e) {
            throw new IOException("Unable to get input stream for entry: " + entry.getPath() + '/' + entry.getName(), e);
        }
    }
1113158
public String text() {
        try {
            connect();
            return responseCode() >= 400 ? read(connection.getErrorStream()) : read(connection.getInputStream());
        } catch (IOException e) {
            throw new HttpException("Failed URL: " + url, e);
        }finally {
            dispose();
        }
    }
1142410
public InputStream toInputStream() {
        
        String text = toXml();
        return new ByteArrayInputStream(text.getBytes(StandardCharsets.UTF_8));
        
    }
600213
public java.io.InputStream getInputStream() {
        if (_input_stream == null) {
            _input_stream = new TempByteHolder.InputStream();
        }
        return _input_stream;
    }
1050407
public InputStream get(URI uri) {
        HttpConnection httpConnection = Http.GET(uri);
        return executeToInputStream(httpConnection);
    }
1297672
public function getBody()
    {
        $streamResource = fopen('php://memory', 'r+');
        if (is_resource($this->content)) {
            stream_copy_to_stream($this->content, $streamResource);
        } else {
            fwrite($streamResource, $this->content);
        }
        rewind($streamResource);

        return new ContentStream($streamResource);
    }
779869
private InputStream asInputStream() {
        InputStream inputStream = classLoader.getResourceAsStream(path);
        if (inputStream == null) {
            throw new RuntimeException("File '" + path + "' was not found.");
        }
        return inputStream;
    }
342769
InputStream getInputStream() {
    InputStream result = (InputStream) streams.get();
    return ((result == null) ? defaultInputStream : result);
  }
437943
public InputStream getInputStream()
    throws IOException
  {
    if (_is == null)
      _is = new FileInputStream(_file.getFD());

    return _is;
  }
296202
public function getBody()
    {
        // If this value has been read from the stream, retrieve it from storage
        if (null !== $this->input[self::INPUT_METHOD_BODY]) {
            return $this->input[self::INPUT_METHOD_BODY];
        }

        if (is_resource($this->stream) && 'stream' === get_resource_type($this->stream)) {
            $streamData = stream_get_contents($this->stream);
        } elseif (is_string($this->stream)) {
            $stream = @fopen($this->stream, "r");

            if (false === $stream) {
                throw new InternalErrorException('Unable to open request input stream.');
            }

            $streamData = stream_get_contents($stream);

            fclose($stream);
        } else {
            $streamData = false;
        }

        if (false === $streamData) {
            throw new InternalErrorException('Unable to open request input stream.');
        }

        $this->input[self::INPUT_METHOD_BODY] = $streamData;

        return $this->input[self::INPUT_METHOD_BODY];
    }
1364025
@Override
    public InputStream getContent() {
        // todo - this needs to be more complete so the proxy information will
        // make it up to the higher levels. Ie, so one can pass back the response information
        try {
            return getResourceUri().toURL().openStream();
        } catch (final IOException e) {
            throw new ExternalContentAccessException("Problems getting external content : " + e.getMessage(), e);
        }
    }
239134
protected ByteBuffer inputStreamToByteBuffer() throws IOException {
        return byteBuffer == null ? byteBuffer = ByteBuffer.wrap(inputStreamToByteArray()) : byteBuffer;
    }
980833
public function getBody()
    {
        if (!($this->body instanceof StreamInterface)) {
            $this->body = new Stream(Stream::createResourceTemp());
        }

        return $this->body;
    }