Android
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<StringList<String>>  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<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.
Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:56