APIdia Launch Partner
Top Description Constructors Methods
java.net

public abstract Class CacheResponse

extends Object
Class Inheritance
Known Direct Subclasses
java.net.SecureCacheResponse
Imports
java.io.InputStream, .IOException, java.util.Map, .List

Represent channels for retrieving resources from the ResponseCache. Instances of such a class provide an InputStream that returns the entity body, and also a getHeaders() method which returns the associated response headers.
Author
Yingxian Wang
Since
1.5

Constructor Summary

AccessConstructor and Description
public
CacheResponse()

Constructor for subclasses to call.

Method Summary

Modifier and TypeMethod and Description
public abstract InputStream

Returns:

an InputStream from which the response body can be accessed
getBody
()

Returns the response body as an InputStream.

public abstract Map<String, List<String>>

Returns:

An immutable Map from response header field names to lists of field values. The status line has null as its field name.
getHeaders
()

Returns the response headers as a Map.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

CacheResponseback to summary
public CacheResponse()

Constructor for subclasses to call.

Method Detail

getBodyback to summary
public abstract InputStream getBody() throws IOException

Returns the response body as an InputStream.

Returns:InputStream

an InputStream from which the response body can be accessed

Exceptions
IOException:
if an I/O error occurs while getting the response body
getHeadersback to summary
public abstract Map<String, List<String>> getHeaders() throws IOException

Returns the response headers as a Map.

Returns:Map<String, List<String>>

An immutable Map from response header field names to lists of field values. The status line has null as its field name.

Exceptions
IOException:
if an I/O error occurs while getting the response headers