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

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

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

HttpRequest.dateHeader介绍

[英]Get a date header from the response falling back to returning -1 if the header is missing or parsing fails
[中]如果报头丢失或解析失败,则从返回-1的响应中获取日期报头

代码示例

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

/**
 * Get the 'Last-Modified' header from the response
 *
 * @return last modified value, -1 on failures
 */
public long lastModified() {
  return dateHeader(HEADER_LAST_MODIFIED);
}

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

/**
 * Get the 'Date' header from the response
 *
 * @return date value, -1 on failures
 */
public long date() {
  return dateHeader(HEADER_DATE);
}

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

/**
 * Get a date header from the response falling back to returning -1 if the
 * header is missing or parsing fails
 *
 * @param name
 * @return date, -1 on failures
 * @throws HttpRequestException
 */
public long dateHeader(final String name) throws HttpRequestException {
  return dateHeader(name, -1L);
}

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

/**
 * Get the 'Date' header from the response
 *
 * @return date value, -1 on failures
 */
public long date() {
  return dateHeader(HEADER_DATE);
}

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

/**
 * Get a date header from the response falling back to returning -1 if the
 * header is missing or parsing fails
 *
 * @param name
 * @return date, -1 on failures
 * @throws HttpRequestException
 */
public long dateHeader(final String name) throws HttpRequestException {
 return dateHeader(name, -1L);
}

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

/**
 * Get the 'Date' header from the response
 *
 * @return date value, -1 on failures
 */
public long date() {
 return dateHeader(HEADER_DATE);
}

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

/**
 * Get a date header from the response falling back to returning -1 if the
 * header is missing or parsing fails
 *
 * @param name
 * @return date, -1 on failures
 * @throws HttpRequestException
 */
public long dateHeader(final String name) throws HttpRequestException {
  return dateHeader(name, -1L);
}

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

/**
 * Get the 'Expires' header from the response
 *
 * @return expires value, -1 on failures
 */
public long expires() {
 return dateHeader(HEADER_EXPIRES);
}

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

/**
 * Get the 'Last-Modified' header from the response
 *
 * @return last modified value, -1 on failures
 */
public long lastModified() {
 return dateHeader(HEADER_LAST_MODIFIED);
}

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

/**
 * Get the 'Expires' header from the response
 *
 * @return expires value, -1 on failures
 */
public long expires() {
  return dateHeader(HEADER_EXPIRES);
}

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

/**
 * Get the 'Expires' header from the response
 *
 * @return expires value, -1 on failures
 */
public long expires() {
 return dateHeader(HEADER_EXPIRES);
}

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

/**
 * Get the 'Last-Modified' header from the response
 *
 * @return last modified value, -1 on failures
 */
public long lastModified() {
 return dateHeader(HEADER_LAST_MODIFIED);
}

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

/**
 * Get the 'Expires' header from the response
 *
 * @return expires value, -1 on failures
 */
public long expires() {
  return dateHeader(HEADER_EXPIRES);
}

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

/**
 * Get a date header from the response falling back to returning -1 if the
 * header is missing or parsing fails
 *
 * @param name
 * @return date, -1 on failures
 * @throws HttpRequestException
 */
public long dateHeader(final String name) throws HttpRequestException {
 return dateHeader(name, -1L);
}

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

/**
 * Get the 'Date' header from the response
 *
 * @return date value, -1 on failures
 */
public long date() {
 return dateHeader(HEADER_DATE);
}

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

/**
 * Get the 'Last-Modified' header from the response
 *
 * @return last modified value, -1 on failures
 */
public long lastModified() {
  return dateHeader(HEADER_LAST_MODIFIED);
}

相关文章

HttpRequest类方法