org.apache.commons.httpclient.HttpConnection.getResponseInputStream()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(7.8k)|赞(0)|评价(0)|浏览(86)

本文整理了Java中org.apache.commons.httpclient.HttpConnection.getResponseInputStream()方法的一些代码示例,展示了HttpConnection.getResponseInputStream()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HttpConnection.getResponseInputStream()方法的具体详情如下:
包路径:org.apache.commons.httpclient.HttpConnection
类名称:HttpConnection
方法名:getResponseInputStream

HttpConnection.getResponseInputStream介绍

[英]Return a InputStream suitable for reading the response.
[中]返回适合读取响应的InputStream。

代码示例

代码示例来源:origin: commons-httpclient/commons-httpclient

public InputStream getResponseInputStream()
  throws IOException, IllegalStateException {
  if (hasConnection()) {
    return wrappedConnection.getResponseInputStream();
  } else {
    return null;
  }
}

代码示例来源:origin: commons-httpclient/commons-httpclient

conn.getResponseInputStream(), getParams().getHttpElementCharset());

代码示例来源:origin: commons-httpclient/commons-httpclient

InputStream is = conn.getResponseInputStream();
if (Wire.CONTENT_WIRE.enabled()) {
  is = new WireLogInputStream(is, Wire.CONTENT_WIRE);

代码示例来源:origin: org.wso2.commons-httpclient/commons-httpclient

public InputStream getResponseInputStream()
  throws IOException, IllegalStateException {
  if (hasConnection()) {
    return wrappedConnection.getResponseInputStream();
  } else {
    return null;
  }
}

代码示例来源:origin: org.sonatype.nexus/nexus-proxy

public InputStream getResponseInputStream()
  throws IOException, IllegalStateException {
  if (hasConnection()) {
    return wrappedConnection.getResponseInputStream();
  } else {
    return null;
  }
}

代码示例来源:origin: org.apache.commons/com.springsource.org.apache.commons.httpclient

public InputStream getResponseInputStream()
  throws IOException, IllegalStateException {
  if (hasConnection()) {
    return wrappedConnection.getResponseInputStream();
  } else {
    return null;
  }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-httpclient

public InputStream getResponseInputStream()
  throws IOException, IllegalStateException {
  if (hasConnection()) {
    return wrappedConnection.getResponseInputStream();
  } else {
    return null;
  }
}

代码示例来源:origin: org.apache.commons/httpclient

public InputStream getResponseInputStream()
  throws IOException, IllegalStateException {
  if (hasConnection()) {
    return wrappedConnection.getResponseInputStream();
  } else {
    return null;
  }
}

代码示例来源:origin: org.zaproxy/zap

/**
 * {@inheritDoc}
 * 
 * <strong>Note:</strong> Malformed HTTP header lines are ignored (instead of throwing an exception).
 */
/*
 * Implementation copied from HttpMethodBase#readResponseHeaders(HttpState, HttpConnection) but changed to use a custom
 * header parser (ZapHttpParser#parseHeaders(InputStream, String)).
 */
@Override
protected void readResponseHeaders(HttpState state, HttpConnection conn) throws IOException, HttpException {
  getResponseHeaderGroup().clear();
  Header[] headers = ZapHttpParser.parseHeaders(conn.getResponseInputStream(), getParams().getHttpElementCharset());
  // Wire logging moved to HttpParser
  getResponseHeaderGroup().setHeaders(headers);
}

代码示例来源:origin: org.apache.commons/httpclient

conn.getResponseInputStream(), getParams().getHttpElementCharset());

代码示例来源:origin: org.apache.commons/com.springsource.org.apache.commons.httpclient

conn.getResponseInputStream(), getParams().getHttpElementCharset());

代码示例来源:origin: org.zaproxy/zap

/**
   * {@inheritDoc}
   * 
   * <strong>Note:</strong> Malformed HTTP header lines are ignored (instead of throwing an exception).
   */
  /*
   * Implementation copied from HttpMethodBase#readResponseHeaders(HttpState, HttpConnection) but changed to use a custom
   * header parser (ZapHttpParser#parseHeaders(InputStream, String)).
   */
  @Override
  protected void readResponseHeaders(HttpState state, HttpConnection conn) throws IOException, HttpException {
    getResponseHeaderGroup().clear();

    Header[] headers = ZapHttpParser.parseHeaders(conn.getResponseInputStream(), getParams().getHttpElementCharset());
    // Wire logging moved to HttpParser
    getResponseHeaderGroup().setHeaders(headers);
  }
}

代码示例来源:origin: org.zaproxy/zap

/**
   * {@inheritDoc}
   * 
   * <strong>Note:</strong> Malformed HTTP header lines are ignored (instead of throwing an exception).
   */
  /*
   * Implementation copied from HttpMethodBase#readResponseHeaders(HttpState, HttpConnection) but changed to use a custom
   * header parser (ZapHttpParser#parseHeaders(InputStream, String)).
   */
  @Override
  protected void readResponseHeaders(HttpState state, HttpConnection conn) throws IOException, HttpException {
    getResponseHeaderGroup().clear();

    Header[] headers = ZapHttpParser.parseHeaders(conn.getResponseInputStream(), getParams().getHttpElementCharset());
    // Wire logging moved to HttpParser
    getResponseHeaderGroup().setHeaders(headers);
  }
}

代码示例来源:origin: org.zaproxy/zap

/**
   * {@inheritDoc}
   * 
   * <strong>Note:</strong> Malformed HTTP header lines are ignored (instead of throwing an exception).
   */
  /*
   * Implementation copied from HttpMethodBase#readResponseHeaders(HttpState, HttpConnection) but changed to use a custom
   * header parser (ZapHttpParser#parseHeaders(InputStream, String)).
   */
  @Override
  protected void readResponseHeaders(HttpState state, HttpConnection conn) throws IOException, HttpException {
    getResponseHeaderGroup().clear();

    Header[] headers = ZapHttpParser.parseHeaders(conn.getResponseInputStream(), getParams().getHttpElementCharset());
    // Wire logging moved to HttpParser
    getResponseHeaderGroup().setHeaders(headers);
  }
}

代码示例来源:origin: org.zaproxy/zap

conn.getResponseInputStream(), getParams().getHttpElementCharset());

代码示例来源:origin: org.wso2.commons-httpclient/commons-httpclient

conn.getResponseInputStream(), getParams().getHttpElementCharset());

代码示例来源:origin: org.zaproxy/zap

/**
   * {@inheritDoc}
   * 
   * <strong>Note:</strong> Malformed HTTP header lines are ignored (instead of throwing an exception).
   */
  /*
   * Implementation copied from HttpMethodBase#readResponseHeaders(HttpState, HttpConnection) but changed to use a custom
   * header parser (ZapHttpParser#parseHeaders(InputStream, String)).
   */
  @Override
  protected void readResponseHeaders(HttpState state, HttpConnection conn) throws IOException, HttpException {
    getResponseHeaderGroup().clear();

    Header[] headers = ZapHttpParser.parseHeaders(conn.getResponseInputStream(), getParams().getHttpElementCharset());
    // Wire logging moved to HttpParser
    getResponseHeaderGroup().setHeaders(headers);
  }
}

代码示例来源:origin: org.zaproxy/zap

/**
   * {@inheritDoc}
   * 
   * <strong>Note:</strong> Malformed HTTP header lines are ignored (instead of throwing an exception).
   */
  /*
   * Implementation copied from HttpMethodBase#readResponseHeaders(HttpState, HttpConnection) but changed to use a custom
   * header parser (ZapHttpParser#parseHeaders(InputStream, String)).
   */
  @Override
  protected void readResponseHeaders(HttpState state, HttpConnection conn) throws IOException, HttpException {
    getResponseHeaderGroup().clear();

    Header[] headers = ZapHttpParser.parseHeaders(conn.getResponseInputStream(), getParams().getHttpElementCharset());
    // Wire logging moved to HttpParser
    getResponseHeaderGroup().setHeaders(headers);
  }
}

代码示例来源:origin: org.zaproxy/zap

/**
   * {@inheritDoc}
   * 
   * <strong>Note:</strong> Malformed HTTP header lines are ignored (instead of throwing an exception).
   */
  /*
   * Implementation copied from HttpMethodBase#readResponseHeaders(HttpState, HttpConnection) but changed to use a custom
   * header parser (ZapHttpParser#parseHeaders(InputStream, String)).
   */
  @Override
  protected void readResponseHeaders(HttpState state, HttpConnection conn) throws IOException, HttpException {
    getResponseHeaderGroup().clear();

    Header[] headers = ZapHttpParser.parseHeaders(conn.getResponseInputStream(), getParams().getHttpElementCharset());
    // Wire logging moved to HttpParser
    getResponseHeaderGroup().setHeaders(headers);
  }
}

代码示例来源:origin: org.zaproxy/zap

/**
   * {@inheritDoc}
   * 
   * <strong>Note:</strong> Malformed HTTP header lines are ignored (instead of throwing an exception).
   */
  /*
   * Implementation copied from HttpMethodBase#readResponseHeaders(HttpState, HttpConnection) but changed to use a custom
   * header parser (ZapHttpParser#parseHeaders(InputStream, String)).
   */
  @Override
  protected void readResponseHeaders(HttpState state, HttpConnection conn) throws IOException, HttpException {
    getResponseHeaderGroup().clear();

    Header[] headers = ZapHttpParser.parseHeaders(conn.getResponseInputStream(), getParams().getHttpElementCharset());
    // Wire logging moved to HttpParser
    getResponseHeaderGroup().setHeaders(headers);
  }
}

相关文章

微信公众号

最新文章

更多

HttpConnection类方法