Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.

UploadDataSink

public abstract class UploadDataSink extends Object

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

Public Constructor Summary

Public Method Summary

abstract void
onReadError(Exception exception)
Called by UploadDataProvider when a read fails.
abstract void
onReadSucceeded(boolean finalChunk)
Called by UploadDataProvider when a read succeeds.
abstract void
onRewindError(Exception exception)
Called by UploadDataProvider when a rewind fails, or if rewinding uploads is not supported.
abstract void
onRewindSucceeded()
Called by UploadDataProvider when a rewind succeeds.

Inherited Method Summary

Public Constructors

public UploadDataSink ()

Public Methods

public abstract void onReadError (Exception exception)

Called by UploadDataProvider when a read fails.

Parameters
exception Exception passed on to the embedder.

public abstract void onReadSucceeded (boolean finalChunk)

Called by UploadDataProvider when a read succeeds.

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

public abstract void onRewindError (Exception exception)

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

Parameters
exception Exception passed on to the embedder.

public abstract void onRewindSucceeded ()

Called by UploadDataProvider when a rewind succeeds.