Java 类com.squareup.okhttp.internal.http.HttpDate 实例源码

项目:platform_external_okhttp    文件:Response.java   
private ParsedHeaders(Headers headers) {
  for (int i = 0; i < headers.size(); i++) {
    String fieldName = headers.name(i);
    String value = headers.value(i);
    if ("Last-Modified".equalsIgnoreCase(fieldName)) {
      lastModified = HttpDate.parse(value);
    } else if ("Vary".equalsIgnoreCase(fieldName)) {
      // Replace the immutable empty set with something we can mutate.
      if (varyFields.isEmpty()) {
        varyFields = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
      }
      for (String varyField : value.split(",")) {
        varyFields.add(varyField.trim());
      }
    }
  }
}
项目:boohee_v5.6    文件:HttpURLConnectionImpl.java   
public void setIfModifiedSince(long newValue) {
    super.setIfModifiedSince(newValue);
    if (this.ifModifiedSince != 0) {
        this.requestHeaders.set("If-Modified-Since", HttpDate.format(new Date(this
                .ifModifiedSince)));
    } else {
        this.requestHeaders.removeAll("If-Modified-Since");
    }
}
项目:FMTech    文件:Headers.java   
public final Date getDate(String paramString)
{
  String str = get(paramString);
  if (str != null) {
    return HttpDate.parse(str);
  }
  return null;
}
项目:spdymcsclient    文件:HttpURLConnectionImpl.java   
@Override public void setIfModifiedSince(long newValue) {
  super.setIfModifiedSince(newValue);
  if (ifModifiedSince != 0) {
    requestHeaders.set("If-Modified-Since", HttpDate.format(new Date(ifModifiedSince)));
  } else {
    requestHeaders.removeAll("If-Modified-Since");
  }
}
项目:apiman    文件:HttpURLConnectionImpl.java   
@Override public void setIfModifiedSince(long newValue) {
  super.setIfModifiedSince(newValue);
  if (ifModifiedSince != 0) {
    requestHeaders.set("If-Modified-Since", HttpDate.format(new Date(ifModifiedSince)));
  } else {
    requestHeaders.removeAll("If-Modified-Since");
  }
}
项目:boohee_v5.6    文件:Headers.java   
public Date getDate(String name) {
    String value = get(name);
    return value != null ? HttpDate.parse(value) : null;
}
项目:spdymcsclient    文件:Headers.java   
/**
 * Returns the last value corresponding to the specified field parsed as an
 * HTTP date, or null if either the field is absent or cannot be parsed as a
 * date.
 */
public Date getDate(String name) {
  String value = get(name);
  return value != null ? HttpDate.parse(value) : null;
}