类 HttpHeaderParser
java.lang.Object
com.android.volley.toolbox.HttpHeaderParser
Utility methods for parsing HTTP headers.
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static Cache.EntryparseCacheHeaders(NetworkResponse response) Extracts aCache.Entryfrom aNetworkResponse.static StringparseCharset(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 StringparseCharset(Map<String, String> headers, String defaultCharset) Retrieve a charset from headersstatic longparseDateAsEpoch(String dateStr) Parse date in RFC1123 format, and return its value as epoch
-
构造器详细资料
-
HttpHeaderParser
public HttpHeaderParser()
-
-
方法详细资料
-
parseCacheHeaders
Extracts aCache.Entryfrom aNetworkResponse.- 参数:
response- The network response to parse headers from- 返回:
- a cache entry for the given response, or null if the response is not cacheable.
-
parseDateAsEpoch
Parse date in RFC1123 format, and return its value as epoch -
parseCharset
Retrieve a charset from headers- 参数:
headers- AnMapof headersdefaultCharset- Charset to return if none can be found- 返回:
- Returns the charset specified in the Content-Type of this header, or the defaultCharset if none can be found.
-
parseCharset
Returns the charset specified in the Content-Type of this header, or the HTTP default (ISO-8859-1) if none can be found.
-