Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

# ContentProvider.PipeDataWriter

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/content/ContentProvider.PipeDataWriter "View this page in Kotlin") \|Java


`
public
static


interface
ContentProvider.PipeDataWriter
`


`


`

|---|
| android.content.ContentProvider.PipeDataWriter\<T\> |

<br />

*** ** * ** ***

Interface to write a stream of data to a pipe. Use with
`https://developer.android.com/reference/android/content/ContentProvider#openPipeHelper(android.net.Uri,%20java.lang.String,%20android.os.Bundle,%20T,%20android.content.ContentProvider.PipeDataWriter<T>)`.

## Summary

| ### Public methods ||
|---|---|
| ` abstract void` | ` https://developer.android.com/reference/android/content/ContentProvider.PipeDataWriter#writeDataToPipe(android.os.ParcelFileDescriptor,%20android.net.Uri,%20java.lang.String,%20android.os.Bundle,%20T)(https://developer.android.com/reference/android/os/ParcelFileDescriptor output, https://developer.android.com/reference/android/net/Uri uri, https://developer.android.com/reference/java/lang/String mimeType, https://developer.android.com/reference/android/os/Bundle opts, T args) ` Called from a background thread to stream data out to a pipe. |

## Public methods

### writeDataToPipe

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract void writeDataToPipe (ParcelFileDescriptor output, 
                Uri uri, 
                String mimeType, 
                Bundle opts, 
                T args)
```

Called from a background thread to stream data out to a pipe.
Note that the pipe is blocking, so this thread can block on
writes for an arbitrary amount of time if the client is slow
at reading.

<br />

| Parameters ||
|---|---|
| `output` | `ParcelFileDescriptor`: The pipe where data should be written. This will be closed for you upon returning from this function. This value cannot be `null`. <br /> |
| `uri` | `Uri`: The URI whose data is to be written. This value cannot be `null`. <br /> |
| `mimeType` | `String`: The desired type of data to be written. This value cannot be `null`. <br /> |
| `opts` | `Bundle`: Options supplied by caller. This value may be `null`. <br /> |
| `args` | `T`: Your own custom arguments. This value may be `null`. <br /> |