HttpResponseCache.Put(URI, URLConnection) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Allows the protocol handler to cache data after retrieving resources.
[Android.Runtime.Register("put", "(Ljava/net/URI;Ljava/net/URLConnection;)Ljava/net/CacheRequest;", "")]
public override Java.Net.CacheRequest? Put(Java.Net.URI? uri, Java.Net.URLConnection? urlConnection);
[<Android.Runtime.Register("put", "(Ljava/net/URI;Ljava/net/URLConnection;)Ljava/net/CacheRequest;", "")>]
override this.Put : Java.Net.URI * Java.Net.URLConnection -> Java.Net.CacheRequest
Parameters
- uri
- URI
the reference to the requested resource.
- urlConnection
- URLConnection
the connection to fetch the response.
Returns
a CacheRequest for recording the response to be cached. Null return indicates that the caller does not intend to cache the response.
- Attributes
Exceptions
Remarks
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.
Android reference for android.net.http.HttpResponseCache.put.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.