The protocol handler calls this method after a resource has been retrieved, and the ResponseCache must decide whether or not to store the resource in its cache. If the resource is to be cached, then put() must return a CacheRequest object which contains an OutputStream that the protocol handler will use to write the resource into the cache. If the resource is not to be cached, then put must return null.
uri | a URI used to reference the requested
network resource | |
conn | - a URLConnection instance that is used to fetch the response to be cached |
CacheRequest for recording the
response to be cached. Null return indicates that
the caller does not intend to cache the response.
IOException | if an I/O error occurs | |
IllegalArgumentException | if any one of the arguments is null |
Diagram: Cache