ParcelFileDescriptor.FromFd(Int32) Method

Definition

Create a new ParcelFileDescriptor from a raw native fd.

[Android.Runtime.Register("fromFd", "(I)Landroid/os/ParcelFileDescriptor;", "")]
public static Android.OS.ParcelFileDescriptor? FromFd (int fd);
[<Android.Runtime.Register("fromFd", "(I)Landroid/os/ParcelFileDescriptor;", "")>]
static member FromFd : int -> Android.OS.ParcelFileDescriptor

Parameters

fd
Int32

The native fd that the ParcelFileDescriptor should dup.

Returns

Returns a new ParcelFileDescriptor holding a FileDescriptor for a dup of the given fd.

Attributes

Exceptions

Remarks

Create a new ParcelFileDescriptor from a raw native fd. The new ParcelFileDescriptor holds a dup of the original fd passed in here, so you must still close that fd as well as the new ParcelFileDescriptor.

Java documentation for android.os.ParcelFileDescriptor.fromFd(int).

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