Name
CacheRequest
Synopsis
When
a URLStreamHandler
reads a network resource, it
should call the put( )
method of the currently
installed ResponseCache
, if there is one. If the
cache wants to save a local copy of the resource, it will return a
CacheRequest
object to the
URLStreamHandler
. The handler should then write
the resource to the OutputStream
returned by the
getBody( )
method.
See also CacheResponse
. This class is used by the
implementors of URLStreamHandler
, not by casual
users of the java.net
package.
public abstract class CacheRequest { // Public Constructors public CacheRequest( ); // Public Instance Methods public abstract void abort( ); public abstract java.io.OutputStream getBody( ) throws java.io.IOException; }
Returned By
ResponseCache.put( )
Get Java in a Nutshell, 5th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.