java.net
Class CacheResponse

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.net.CacheResponse
Direct Known Subclasses:
SecureCacheResponse sample code for java.net.SecureCacheResponse definition code for java.net.SecureCacheResponse

public abstract class CacheResponse
extends Object sample code for java.lang.Object definition code for java.lang.Object

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.

Since:
1.5

Constructor Summary
CacheResponse sample code for java.net.CacheResponse.CacheResponse() definition code for java.net.CacheResponse.CacheResponse() ()
           
 
Method Summary
abstract  InputStream sample code for java.io.InputStream definition code for java.io.InputStream getBody sample code for java.net.CacheResponse.getBody() definition code for java.net.CacheResponse.getBody() ()
          Returns the response body as an InputStream.
abstract  Map sample code for java.util.Map definition code for java.util.Map <String sample code for java.lang.String definition code for java.lang.String ,List sample code for java.util.List definition code for java.util.List <String sample code for java.lang.String definition code for java.lang.String >> getHeaders sample code for java.net.CacheResponse.getHeaders() definition code for java.net.CacheResponse.getHeaders() ()
          Returns the response headers as a Map.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

CacheResponse sample code for java.net.CacheResponse() definition code for java.net.CacheResponse()

public CacheResponse()
Method Detail

getHeaders sample code for java.net.CacheResponse.getHeaders() definition code for java.net.CacheResponse.getHeaders()

public abstract Map sample code for java.util.Map definition code for java.util.Map <String sample code for java.lang.String definition code for java.lang.String ,List sample code for java.util.List definition code for java.util.List <String sample code for java.lang.String definition code for java.lang.String >> getHeaders()
                                             throws IOException sample code for java.io.IOException definition code for java.io.IOException 
Returns the response headers as a Map.

Returns:
An immutable Map from response header field names to lists of field values. The status line has null as its field name.
Throws:
IOException sample code for java.io.IOException definition code for java.io.IOException - if an I/O error occurs while getting the response headers

getBody sample code for java.net.CacheResponse.getBody() definition code for java.net.CacheResponse.getBody()

public abstract InputStream sample code for java.io.InputStream definition code for java.io.InputStream  getBody()
                             throws IOException sample code for java.io.IOException definition code for java.io.IOException 
Returns the response body as an InputStream.

Returns:
an InputStream from which the response body can be accessed
Throws:
IOException sample code for java.io.IOException definition code for java.io.IOException - if an I/O error occurs while getting the response body