Share via


Parcel.WriteFileDescriptor(FileDescriptor) Method

Definition

Write a FileDescriptor into the parcel at the current dataPosition(), growing dataCapacity() if needed.

[Android.Runtime.Register("writeFileDescriptor", "(Ljava/io/FileDescriptor;)V", "")]
public void WriteFileDescriptor (Java.IO.FileDescriptor val);
[<Android.Runtime.Register("writeFileDescriptor", "(Ljava/io/FileDescriptor;)V", "")>]
member this.WriteFileDescriptor : Java.IO.FileDescriptor -> unit

Parameters

Attributes

Remarks

Write a FileDescriptor into the parcel at the current dataPosition(), growing dataCapacity() if needed.

<p class="caution">The file descriptor will not be closed, which may result in file descriptor leaks when objects are returned from Binder calls. Use ParcelFileDescriptor#writeToParcel instead, which accepts contextual flags and will close the original file descriptor if Parcelable#PARCELABLE_WRITE_RETURN_VALUE is set.</p>

Java documentation for android.os.Parcel.writeFileDescriptor(java.io.FileDescriptor).

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