public class HttpHeaderParser extends Object
| 构造器和说明 |
|---|
HttpHeaderParser() |
| 限定符和类型 | 方法和说明 |
|---|---|
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 String |
parseCharset(Map<String,String> headers,
String defaultCharset)
Retrieve a charset from headers
|
static long |
parseDateAsEpoch(String dateStr)
Parse date in RFC1123 format, and return its value as epoch
|
public static Cache.Entry parseCacheHeaders(NetworkResponse response)
Cache.Entry from a NetworkResponse.response - The network response to parse headers frompublic static long parseDateAsEpoch(String dateStr)
public static String parseCharset(Map<String,String> headers, String defaultCharset)
headers - An Map of headersdefaultCharset - Charset to return if none can be foundCopyright © 2018. All rights reserved.