com.google.api.client.http
Class HttpHeaders

java.lang.Object
  extended by java.util.AbstractMap<String,Object>
      extended by com.google.api.client.util.GenericData
          extended by com.google.api.client.http.HttpHeaders
All Implemented Interfaces:
Cloneable, Map<String,Object>

public class HttpHeaders
extends GenericData

Stores HTTP headers used in an HTTP request or response, as defined in Header Field Definitions.

null is not allowed as a name or value of a header. Names are case-insensitive.

Since:
1.0
Author:
Yaniv Inbar

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
 String accept
          "Accept" header.
 String acceptEncoding
          "Accept-Encoding" header.
 String authenticate
          "WWW-Authenticate" header.
 String authorization
          "Authorization" header.
 String cacheControl
          "Cache-Control" header.
 String contentEncoding
          "Content-Encoding" header.
 String contentLength
          "Content-Length" header.
 String contentMD5
          "Content-MD5" header.
 String contentRange
          "Content-Range" header.
 String contentType
          "Content-Type" header.
 String date
          "Date" header.
 String etag
          "ETag" header.
 String expires
          "Expires" header.
 String ifMatch
          "If-Match" header.
 String ifModifiedSince
          "If-Modified-Since" header.
 String ifNoneMatch
          "If-None-Match" header.
 String ifUnmodifiedSince
          "If-Unmodified-Since" header.
 String lastModified
          "Last-Modified" header.
 String location
          "Location" header.
 String mimeVersion
          "MIME-Version" header.
 String range
          "Range" header.
 String retryAfter
          "Retry-After" header.
 String userAgent
          "User-Agent" header.
 
Fields inherited from class com.google.api.client.util.GenericData
unknownFields
 
Constructor Summary
HttpHeaders()
           
 
Method Summary
 Map<String,Collection<Object>> canonicalMap()
          Deprecated. (scheduled to be removed in 1.5)
 HttpHeaders clone()
          Makes a "deep" clone of the generic data, in which the clone is completely independent of the original.
 void setBasicAuthentication(String username, String password)
          Sets the authorization header as specified in Basic Authentication Scheme.
 
Methods inherited from class com.google.api.client.util.GenericData
entrySet, get, put, putAll, remove, set
 
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, equals, hashCode, isEmpty, keySet, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

accept

public String accept
"Accept" header.


acceptEncoding

public String acceptEncoding
"Accept-Encoding" header. By default, this is "gzip".


authorization

public String authorization
"Authorization" header.


cacheControl

public String cacheControl
"Cache-Control" header.


contentEncoding

public String contentEncoding
"Content-Encoding" header.


contentLength

public String contentLength
"Content-Length" header.


contentMD5

public String contentMD5
"Content-MD5" header.


contentRange

public String contentRange
"Content-Range" header.


contentType

public String contentType
"Content-Type" header.


date

public String date
"Date" header.


etag

public String etag
"ETag" header.


expires

public String expires
"Expires" header.


ifModifiedSince

public String ifModifiedSince
"If-Modified-Since" header.


ifMatch

public String ifMatch
"If-Match" header.


ifNoneMatch

public String ifNoneMatch
"If-None-Match" header.


ifUnmodifiedSince

public String ifUnmodifiedSince
"If-Unmodified-Since" header.


lastModified

public String lastModified
"Last-Modified" header.


location

public String location
"Location" header.


mimeVersion

public String mimeVersion
"MIME-Version" header.


range

public String range
"Range" header.


retryAfter

public String retryAfter
"Retry-After" header.


userAgent

public String userAgent
"User-Agent" header.


authenticate

public String authenticate
"WWW-Authenticate" header.

Constructor Detail

HttpHeaders

public HttpHeaders()
Method Detail

clone

public HttpHeaders clone()
Description copied from class: GenericData
Makes a "deep" clone of the generic data, in which the clone is completely independent of the original.

Overrides:
clone in class GenericData

setBasicAuthentication

public void setBasicAuthentication(String username,
                                   String password)
Sets the authorization header as specified in Basic Authentication Scheme.

Since:
1.2

canonicalMap

@Deprecated
public Map<String,Collection<Object>> canonicalMap()
Deprecated. (scheduled to be removed in 1.5)

Computes a canonical map from lower-case header name to its values.

Returns:
canonical map from lower-case header name to its values


Copyright © 2010-2011 Google. All Rights Reserved.