Share via


UploadDataProvider.Rewind(UploadDataSink) Method

Definition

Rewinds upload data.

[Android.Runtime.Register("rewind", "(Landroid/net/http/UploadDataSink;)V", "GetRewind_Landroid_net_http_UploadDataSink_Handler", ApiSince=34)]
public abstract void Rewind (Android.Net.Http.UploadDataSink uploadDataSink);
[<Android.Runtime.Register("rewind", "(Landroid/net/http/UploadDataSink;)V", "GetRewind_Landroid_net_http_UploadDataSink_Handler", ApiSince=34)>]
abstract member Rewind : Android.Net.Http.UploadDataSink -> unit

Parameters

uploadDataSink
UploadDataSink

The object to notify when the rewind operation has completed, successfully or otherwise.

Attributes

Remarks

Rewinds upload data. Each call must be followed be a single call, either synchronous or asynchronous, to uploadDataSink: UploadDataSink#onRewindSucceeded on success or UploadDataSink#onRewindError on failure. Neither read nor rewind will be called until one of those methods or the other is called. Even if the associated UrlRequest is canceled, one or the other must still be called before resources can be safely freed. Throwing an exception will also result in resources being freed and the request being errored out.

If rewinding is not supported, this should call UploadDataSink#onRewindError. Note that rewinding is required to follow redirects that preserve the upload body, and for retrying when the server times out stale sockets.

Java documentation for android.net.http.UploadDataProvider.rewind(android.net.http.UploadDataSink).

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.

Applies to