Most visited

Recently visited

Added in API level 1

CacheResponse

public abstract class CacheResponse
extends Object

java.lang.Object
   ↳ java.net.CacheResponse
Known Direct Subclasses


表示从ResponseCache中检索资源的通道。 这样的类的实例提供一个返回实体主体的InputStream,以及一个返回相关响应头的getHeaders()方法。

Summary

Public constructors

CacheResponse()

Public methods

abstract InputStream getBody()

以InputStream形式返回响应主体。

abstract Map<StringList<String>> getHeaders()

以Map的形式返回响应标题。

Inherited methods

From class java.lang.Object

Public constructors

CacheResponse

Added in API level 1
CacheResponse ()

Public methods

getBody

Added in API level 1
InputStream getBody ()

以InputStream形式返回响应主体。

Returns
InputStream an InputStream from which the response body can be accessed
Throws
IOException if an I/O error occurs while getting the response body

getHeaders

Added in API level 1
Map<StringList<String>> getHeaders ()

以Map的形式返回响应标题。

Returns
Map<StringList<String>> An immutable Map from response header field names to lists of field values. The status line has null as its field name.
Throws
IOException if an I/O error occurs while getting the response headers

Hooray!