加载中...
The Wayback Machine - https://sup1a9wrlpyh5li9ro.vcoronado.top/web/20090228215644/http://developer.android.com:80/reference/java/net/CacheResponse.html
public abstract class

CacheResponse

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

Class Overview

CacheResponse is used for getting resource from the ResponseCache. An CacheResponse object provides an InputStream to access the response body, and also a method getHeaders() to fetch the response headers.

Summary

Public Constructors
CacheResponse()
Constructor method
Public Methods
abstract InputStream getBody()
Returns an InputStream for the respsonse body access.
abstract Map<StringList<String>> getHeaders()
Returns an immutable Map, which contains the response headers information.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public CacheResponse ()

Constructor method

Public Methods

public abstract InputStream getBody ()

Returns an InputStream for the respsonse body access.

Returns
  • an InputStream, which can be used to fetch the response body.
Throws
IOException if an I/O error is encounted while retrieving the response body.

public abstract Map<StringList<String>> getHeaders ()

Returns an immutable Map, which contains the response headers information.

Returns
  • an immutable Map, which contains the response headers. The map is from response header field names to lists of field values. Field name is a String, and the field values list is a List of String.The status line as its field name has null as its list of field values.
Throws
IOException if an I/O error is encounted while retrieving the response headers.