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 |
abstract Unit |
onReadSucceeded(finalChunk: Boolean) Called by |
abstract Unit |
onRewindError(exception: Exception) Called by |
abstract Unit |
Called by |
Public constructors
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.