public abstract class**UploadDataSink** extends Object  
Defines callbacks methods for[UploadDataProvider](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UploadDataProvider.html). All methods may be called synchronously or asynchronously, on any thread.  

### Public Constructor Summary

|---|-----------------------------------------------------------------------------------------------------------------------------------------------|
|   | [UploadDataSink](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UploadDataSink.html#UploadDataSink())() |

### Public Method Summary

|---------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| abstract void | [onReadError](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UploadDataSink.html#onReadError(java.lang.Exception))(Exception exception) Called by[UploadDataProvider](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UploadDataProvider.html)when a read fails.                                                 |
| abstract void | [onReadSucceeded](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UploadDataSink.html#onReadSucceeded(boolean))(boolean finalChunk) Called by[UploadDataProvider](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UploadDataProvider.html)when a read succeeds.                                                   |
| abstract void | [onRewindError](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UploadDataSink.html#onRewindError(java.lang.Exception))(Exception exception) Called by[UploadDataProvider](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UploadDataProvider.html)when a rewind fails, or if rewinding uploads is not supported. |
| abstract void | [onRewindSucceeded](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UploadDataSink.html#onRewindSucceeded())() Called by[UploadDataProvider](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UploadDataProvider.html)when a rewind succeeds.                                                                      |

### Inherited Method Summary

From class java.lang.Object  

|------------------|---------------------------|
| Object           | clone()                   |
| boolean          | equals(Object arg0)       |
| void             | finalize()                |
| final Class\<?\> | getClass()                |
| int              | hashCode()                |
| final void       | notify()                  |
| final void       | notifyAll()               |
| String           | toString()                |
| final void       | wait(long arg0, int arg1) |
| final void       | wait(long arg0)           |
| final void       | wait()                    |

## Public Constructors

#### public**UploadDataSink**()

<br />

## Public Methods

#### public abstract void**onReadError**(Exception exception)

Called by[UploadDataProvider](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UploadDataProvider.html)when a read fails.  

##### Parameters

| exception | Exception passed on to the embedder. |
|-----------|--------------------------------------|

#### public abstract void**onReadSucceeded**(boolean finalChunk)

Called by[UploadDataProvider](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UploadDataProvider.html)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](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UploadDataProvider.html)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](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UploadDataProvider.html)when a rewind succeeds.