Stay organized with collections
Save and categorize content based on your preferences.
ContentProvider.PipeDataWriter
public
static
interface
ContentProvider.PipeDataWriter
android.content.ContentProvider.PipeDataWriter<T>
|
Interface to write a stream of data to a pipe. Use with
ContentProvider.openPipeHelper
.
Summary
Public methods
writeDataToPipe
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.
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 . |
uri |
Uri : The URI whose data is to be written.
This value cannot be null . |
mimeType |
String : The desired type of data to be written.
This value cannot be null . |
opts |
Bundle : Options supplied by caller.
This value may be null . |
args |
T : Your own custom arguments.
This value may be null . |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# ContentProvider.PipeDataWriter\n\nAdded in [API level 11](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nContentProvider.PipeDataWriter\n==============================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/content/ContentProvider.PipeDataWriter \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\nstatic\n\n\ninterface\nContentProvider.PipeDataWriter\n`\n\n\n`\n\n\n`\n\n|-----------------------------------------------------|\n| android.content.ContentProvider.PipeDataWriter\\\u003cT\\\u003e |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nInterface to write a stream of data to a pipe. Use with\n[ContentProvider.openPipeHelper](/reference/android/content/ContentProvider#openPipeHelper(android.net.Uri,%20java.lang.String,%20android.os.Bundle,%20T,%20android.content.ContentProvider.PipeDataWriter\u003cT\u003e)).\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[writeDataToPipe](/reference/android/content/ContentProvider.PipeDataWriter#writeDataToPipe(android.os.ParcelFileDescriptor,%20android.net.Uri,%20java.lang.String,%20android.os.Bundle,%20T))`(`[ParcelFileDescriptor](/reference/android/os/ParcelFileDescriptor)` output, `[Uri](/reference/android/net/Uri)` uri, `[String](/reference/java/lang/String)` mimeType, `[Bundle](/reference/android/os/Bundle)` opts, T args) ` Called from a background thread to stream data out to a pipe. |\n\nPublic methods\n--------------\n\n### writeDataToPipe\n\nAdded in [API level 11](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void writeDataToPipe (ParcelFileDescriptor output, \n Uri uri, \n String mimeType, \n Bundle opts, \n T args)\n```\n\nCalled from a background thread to stream data out to a pipe.\nNote that the pipe is blocking, so this thread can block on\nwrites for an arbitrary amount of time if the client is slow\nat reading.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `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`. \u003cbr /\u003e |\n| `uri` | `Uri`: The URI whose data is to be written. This value cannot be `null`. \u003cbr /\u003e |\n| `mimeType` | `String`: The desired type of data to be written. This value cannot be `null`. \u003cbr /\u003e |\n| `opts` | `Bundle`: Options supplied by caller. This value may be `null`. \u003cbr /\u003e |\n| `args` | `T`: Your own custom arguments. This value may be `null`. \u003cbr /\u003e |"]]