Name
CacheResponse
Synopsis
If a
ResponseCache
holds a
local copy of a network resource, it returns a
CacheResponse
object from the
ResponseCache.get( )
method. The resource can then
be read from the java.io.InputStream
returned by
getBody( )
.
The protocol response headers are available in the form of
java.util.Map
from getHeaders(
)
.
See also SecureCacheResponse
and
CacheRequest
. Note that this class is intended for
use in URLStreamHandler
implementations, not by
casual users of the java.net
package.
public abstract class CacheResponse { // Public Constructors public CacheResponse( ); // Public Instance Methods public abstract java.io.InputStream getBody( ) throws java.io.IOException; public abstract java.util.Map<String,java.util.List<String>> getHeaders( ) throws java.io.IOException; }
Subclasses
SecureCacheResponse
Returned By
ResponseCache.get( )
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.