java.net
Class CacheRequest

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.net.CacheRequest

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

Represents channels for storing resources in the ResponseCache. Instances of such a class provide an OutputStream object which is called by protocol handlers to store the resource data into the cache, and also an abort() method which allows a cache store operation to be interrupted and abandoned. If an IOException is encountered while reading the response or writing to the cache, the current cache store operation will be aborted.

Since:
1.5

Constructor Summary
CacheRequest sample code for java.net.CacheRequest.CacheRequest() definition code for java.net.CacheRequest.CacheRequest() ()
           
 
Method Summary
abstract  void abort sample code for java.net.CacheRequest.abort() definition code for java.net.CacheRequest.abort() ()
          Aborts the attempt to cache the response.
abstract  OutputStream sample code for java.io.OutputStream definition code for java.io.OutputStream getBody sample code for java.net.CacheRequest.getBody() definition code for java.net.CacheRequest.getBody() ()
          Returns an OutputStream to which the response body can be written.
 
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

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

public CacheRequest()
Method Detail

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

public abstract OutputStream sample code for java.io.OutputStream definition code for java.io.OutputStream  getBody()
                              throws IOException sample code for java.io.IOException definition code for java.io.IOException 
Returns an OutputStream to which the response body can be written.

Returns:
an OutputStream to which the response body can be written
Throws:
IOException sample code for java.io.IOException definition code for java.io.IOException - if an I/O error occurs while writing the response body

abort sample code for java.net.CacheRequest.abort() definition code for java.net.CacheRequest.abort()

public abstract void abort()
Aborts the attempt to cache the response. If an IOException is encountered while reading the response or writing to the cache, the current cache store operation will be abandoned.