com.android.volley.toolbox
Class HttpHeaderParser

java.lang.Object
  extended by com.android.volley.toolbox.HttpHeaderParser

public class HttpHeaderParser
extends Object

Utility methods for parsing HTTP headers.


Constructor Summary
HttpHeaderParser()
           
 
Method Summary
static Cache.Entry parseCacheHeaders(NetworkResponse response)
          Extracts a Cache.Entry from a NetworkResponse.
static String parseCharset(Map<String,String> headers)
          Returns the charset specified in the Content-Type of this header, or the HTTP default (ISO-8859-1) if none can be found.
static long parseDateAsEpoch(String dateStr)
          Parse date in RFC1123 format, and return its value as epoch
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpHeaderParser

public HttpHeaderParser()
Method Detail

parseCacheHeaders

public static Cache.Entry parseCacheHeaders(NetworkResponse response)
Extracts a Cache.Entry from a NetworkResponse.

Parameters:
response - The network response to parse headers from
Returns:
a cache entry for the given response, or null if the response is not cacheable.

parseDateAsEpoch

public static long parseDateAsEpoch(String dateStr)
Parse date in RFC1123 format, and return its value as epoch


parseCharset

public static String parseCharset(Map<String,String> headers)
Returns the charset specified in the Content-Type of this header, or the HTTP default (ISO-8859-1) if none can be found.