UploadDataSink


abstract class UploadDataSink
kotlin.Any
   ↳ android.net.http.UploadDataSink

Defines callbacks methods for UploadDataProvider. All methods may be called synchronously or asynchronously, on any thread.

Summary

Public constructors

Public methods
abstract Unit
onReadError(exception: Exception)

Called by UploadDataProvider when a read fails.

abstract Unit
onReadSucceeded(finalChunk: Boolean)

Called by UploadDataProvider when a read succeeds.

abstract Unit

Called by UploadDataProvider when a rewind fails, or if rewinding uploads is not supported.

abstract Unit

Called by UploadDataProvider when a rewind succeeds.

Public constructors

UploadDataSink

UploadDataSink()

Public methods

onReadError

abstract fun onReadError(exception: Exception): Unit

Called by UploadDataProvider when a read fails.

Parameters
exception Exception: Exception passed on to the embedder. This value cannot be null.

onReadSucceeded

abstract fun onReadSucceeded(finalChunk: Boolean): Unit

Called by UploadDataProvider when a read succeeds.

Parameters
finalChunk Boolean: For chunked uploads, true if this is the final read. It must be false for non-chunked uploads.

onRewindError

abstract fun onRewindError(exception: Exception): Unit

Called by UploadDataProvider when a rewind fails, or if rewinding uploads is not supported.

Parameters
exception Exception: Exception passed on to the embedder. This value cannot be null.

onRewindSucceeded

abstract fun onRewindSucceeded(): Unit

Called by UploadDataProvider when a rewind succeeds.