English | Site Directory

Android - An Open Handset Alliance Project

java.net
public abstract class

java.net.CacheResponse

java.lang.Object
java.net.CacheResponse

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.

Known Direct Subclasses

Summary

Public Constructors

          CacheResponse()
Constructor method

Public Methods

abstract        InputStream  getBody()
Returns an InputStream for the respsonse body access.
abstract        Map  getHeaders()
Returns an immutable Map, which contains the response headers information.
Methods inherited from class java.lang.Object

Details

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 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.
Build m5-rc15i - 10 Jun 2008 13:54