public abstract class

CacheResponse

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

Class Overview

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

See Also

Summary

Public Constructors
CacheResponse()
This implementation does nothing.
Public Methods
abstract InputStream getBody()
Returns an InputStream to access the response body.
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 ()

This implementation does nothing.

Public Methods

public abstract InputStream getBody ()

Returns an InputStream to access the response body.

Returns
  • an InputStream which can be used to fetch the response body.
Throws
IOException if an I/O error is encountered 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 generic map contains response header fields as the key and a list of strings as values.
Throws
IOException if an I/O error is encountered while retrieving the response headers.