Sdílet prostřednictvím


ContentProvider.OpenPipeHelper Method

Definition

A helper function for implementing #openTypedAssetFile, for creating a data pipe and background thread allowing you to stream generated data back to the client.

[Android.Runtime.Register("openPipeHelper", "(Landroid/net/Uri;Ljava/lang/String;Landroid/os/Bundle;Ljava/lang/Object;Landroid/content/ContentProvider$PipeDataWriter;)Landroid/os/ParcelFileDescriptor;", "GetOpenPipeHelper_Landroid_net_Uri_Ljava_lang_String_Landroid_os_Bundle_Ljava_lang_Object_Landroid_content_ContentProvider_PipeDataWriter_Handler")]
[Java.Interop.JavaTypeParameters(new System.String[] { "T" })]
public virtual Android.OS.ParcelFileDescriptor OpenPipeHelper (Android.Net.Uri uri, string mimeType, Android.OS.Bundle? opts, Java.Lang.Object? args, Android.Content.ContentProvider.IPipeDataWriter func);
[<Android.Runtime.Register("openPipeHelper", "(Landroid/net/Uri;Ljava/lang/String;Landroid/os/Bundle;Ljava/lang/Object;Landroid/content/ContentProvider$PipeDataWriter;)Landroid/os/ParcelFileDescriptor;", "GetOpenPipeHelper_Landroid_net_Uri_Ljava_lang_String_Landroid_os_Bundle_Ljava_lang_Object_Landroid_content_ContentProvider_PipeDataWriter_Handler")>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T" })>]
abstract member OpenPipeHelper : Android.Net.Uri * string * Android.OS.Bundle * Java.Lang.Object * Android.Content.ContentProvider.IPipeDataWriter -> Android.OS.ParcelFileDescriptor
override this.OpenPipeHelper : Android.Net.Uri * string * Android.OS.Bundle * Java.Lang.Object * Android.Content.ContentProvider.IPipeDataWriter -> Android.OS.ParcelFileDescriptor

Parameters

uri
Uri

The URI whose data is to be written.

mimeType
String

The desired type of data to be written.

opts
Bundle

Options supplied by caller.

args
Object

Your own custom arguments.

func
ContentProvider.IPipeDataWriter

Interface implementing the function that will actually stream the data.

Returns

Returns a new ParcelFileDescriptor holding the read side of the pipe. This should be returned to the caller for reading; the caller is responsible for closing it when done.

Attributes

Remarks

Java documentation for android.content.ContentProvider.openPipeHelper(android.net.Uri, java.lang.String, android.os.Bundle, java.lang.Object, android.content.PipeDataWriter).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to