com.github.kevinsawicki.http.HttpRequest.closeOutputQuietly()方法的使用及代码示例

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

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

HttpRequest.closeOutputQuietly介绍

[英]Call #closeOutput() and re-throw a caught IOExceptions as an HttpRequestException
[中]调用#closeOutput()并将捕获的IOException作为HttpRequestException重新抛出

代码示例

代码示例来源:origin: com.restfuse/com.eclipsesource.restfuse

/**
 * Get a response header
 *
 * @param name
 * @return response header
 * @throws HttpRequestException
 */
public String header(final String name) throws HttpRequestException {
 closeOutputQuietly();
 return connection.getHeaderField(name);
}

代码示例来源:origin: com.restfuse/com.eclipsesource.restfuse

/**
 * Get all the response headers
 *
 * @return map of response header names to their value(s)
 * @throws HttpRequestException
 */
public Map<String, List<String>> headers() throws HttpRequestException {
 closeOutputQuietly();
 return connection.getHeaderFields();
}

代码示例来源:origin: lkorth/httpebble-android

/**
 * Get all the response headers
 *
 * @return map of response header names to their value(s)
 * @throws HttpRequestException
 */
public Map<String, List<String>> headers() throws HttpRequestException {
  closeOutputQuietly();
  return connection.getHeaderFields();
}

代码示例来源:origin: lkorth/httpebble-android

/**
 * Get a response header
 *
 * @param name
 * @return response header
 * @throws HttpRequestException
 */
public String header(final String name) throws HttpRequestException {
  closeOutputQuietly();
  return connection.getHeaderField(name);
}

代码示例来源:origin: com.github.kevinsawicki/http-request

/**
 * Get all the response headers
 *
 * @return map of response header names to their value(s)
 * @throws HttpRequestException
 */
public Map<String, List<String>> headers() throws HttpRequestException {
 closeOutputQuietly();
 return getConnection().getHeaderFields();
}

代码示例来源:origin: tcking/GiraffePlayer2

/**
 * Get all the response headers
 *
 * @return map of response header names to their value(s)
 * @throws HttpRequestException
 */
public Map<String, List<String>> headers() throws HttpRequestException {
  closeOutputQuietly();
  return getConnection().getHeaderFields();
}

代码示例来源:origin: tcking/GiraffePlayer2

/**
 * Get a response header
 *
 * @param name
 * @return response header
 * @throws HttpRequestException
 */
public String header(final String name) throws HttpRequestException {
  closeOutputQuietly();
  return getConnection().getHeaderField(name);
}

代码示例来源:origin: com.github.kevinsawicki/http-request

/**
 * Get a response header
 *
 * @param name
 * @return response header
 * @throws HttpRequestException
 */
public String header(final String name) throws HttpRequestException {
 closeOutputQuietly();
 return getConnection().getHeaderField(name);
}

代码示例来源:origin: com.restfuse/com.eclipsesource.restfuse

/**
 * Get a date header from the response falling back to returning the given
 * default value if the header is missing or parsing fails
 *
 * @param name
 * @param defaultValue
 * @return date, default value on failures
 * @throws HttpRequestException
 */
public long dateHeader(final String name, final long defaultValue)
  throws HttpRequestException {
 closeOutputQuietly();
 return connection.getHeaderFieldDate(name, defaultValue);
}

代码示例来源:origin: lkorth/httpebble-android

/**
 * Get a date header from the response falling back to returning the given
 * default value if the header is missing or parsing fails
 *
 * @param name
 * @param defaultValue
 * @return date, default value on failures
 * @throws HttpRequestException
 */
public long dateHeader(final String name, final long defaultValue)
    throws HttpRequestException {
  closeOutputQuietly();
  return connection.getHeaderFieldDate(name, defaultValue);
}

代码示例来源:origin: com.restfuse/com.eclipsesource.restfuse

/**
 * Get an integer header value from the response falling back to the given
 * default value if the header is missing or if parsing fails
 *
 * @param name
 * @param defaultValue
 * @return header value as an integer, default value when missing or parsing
 *         fails
 * @throws HttpRequestException
 */
public int intHeader(final String name, final int defaultValue)
  throws HttpRequestException {
 closeOutputQuietly();
 return connection.getHeaderFieldInt(name, defaultValue);
}

代码示例来源:origin: lkorth/httpebble-android

/**
 * Get an integer header value from the response falling back to the given
 * default value if the header is missing or if parsing fails
 *
 * @param name
 * @param defaultValue
 * @return header value as an integer, default value when missing or parsing
 * fails
 * @throws HttpRequestException
 */
public int intHeader(final String name, final int defaultValue)
    throws HttpRequestException {
  closeOutputQuietly();
  return connection.getHeaderFieldInt(name, defaultValue);
}

代码示例来源:origin: com.github.kevinsawicki/http-request

/**
 * Get a date header from the response falling back to returning the given
 * default value if the header is missing or parsing fails
 *
 * @param name
 * @param defaultValue
 * @return date, default value on failures
 * @throws HttpRequestException
 */
public long dateHeader(final String name, final long defaultValue)
  throws HttpRequestException {
 closeOutputQuietly();
 return getConnection().getHeaderFieldDate(name, defaultValue);
}

代码示例来源:origin: tcking/GiraffePlayer2

/**
 * Get a date header from the response falling back to returning the given
 * default value if the header is missing or parsing fails
 *
 * @param name
 * @param defaultValue
 * @return date, default value on failures
 * @throws HttpRequestException
 */
public long dateHeader(final String name, final long defaultValue)
    throws HttpRequestException {
  closeOutputQuietly();
  return getConnection().getHeaderFieldDate(name, defaultValue);
}

代码示例来源:origin: com.github.kevinsawicki/http-request

/**
 * Get an integer header value from the response falling back to the given
 * default value if the header is missing or if parsing fails
 *
 * @param name
 * @param defaultValue
 * @return header value as an integer, default value when missing or parsing
 *         fails
 * @throws HttpRequestException
 */
public int intHeader(final String name, final int defaultValue)
  throws HttpRequestException {
 closeOutputQuietly();
 return getConnection().getHeaderFieldInt(name, defaultValue);
}

代码示例来源:origin: tcking/GiraffePlayer2

/**
 * Get an integer header value from the response falling back to the given
 * default value if the header is missing or if parsing fails
 *
 * @param name
 * @param defaultValue
 * @return header value as an integer, default value when missing or parsing
 *         fails
 * @throws HttpRequestException
 */
public int intHeader(final String name, final int defaultValue)
    throws HttpRequestException {
  closeOutputQuietly();
  return getConnection().getHeaderFieldInt(name, defaultValue);
}

相关文章

HttpRequest类方法