Package java.net
Class CacheRequest
- java.lang.Object
-
- java.net.CacheRequest
-
public abstract class CacheRequest extends Object
CacheRequestis a kind of channel for storing resource data in theResponseCache. A protocol handler calls theOutputStreamwhich is provided by theCacheRequestobject, to store the resource data into the cache. It also allows the user to interrupt and abort the current store operation by calling the methodabort. If anIOExceptionoccurs while reading the response or writing data to the cache, the current cache store operation is abandoned.- See Also:
ResponseCache
-
-
Constructor Summary
Constructors Constructor Description CacheRequest()This implementation does nothing.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract voidabort()Aborts the current cache operation.abstract OutputStreamgetBody()Returns anOutputStreamwhich is used to write the response body.
-
-
-
Method Detail
-
abort
public abstract void abort()
Aborts the current cache operation. If anIOExceptionoccurs while reading the response or writing resource data to the cache, the current cache store operation is aborted.
-
getBody
public abstract OutputStream getBody() throws IOException
Returns anOutputStreamwhich is used to write the response body.- Returns:
- an
OutputStreamwhich is used to write the response body. - Throws:
IOException- if an I/O error is encountered during writing response body operation.
-
-