Android Guides | Samples

Android.OS.ParcelFileDescriptor Class

The FileDescriptor returned by Parcel.ReadFileDescriptor, allowing you to close it when done with it.

See Also: ParcelFileDescriptor

Syntax

[Android.Runtime.Register("android/os/ParcelFileDescriptor", DoNotGenerateAcw=true)]
public class ParcelFileDescriptor : Object, IParcelable, ICloseable, IDisposable

Remarks

The FileDescriptor returned by Parcel.ReadFileDescriptor, allowing you to close it when done with it.

[Android Documentation]

Requirements

Namespace: Android.OS
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1

The members of Android.OS.ParcelFileDescriptor are listed below.

See Also: Object

Public Constructors

Create a new ParcelFileDescriptor wrapped around another descriptor.

Protected Constructors

A constructor used when creating managed representations of JNI objects; called by the runtime.

Public Properties

[read-only]
static
CreatorIParcelableCreator.
[read-only]
FdInt32. Return the native fd int for this ParcelFileDescriptor.
[read-only]
FileDescriptorFileDescriptor. Retrieve the actual FileDescriptor associated with this object.
[read-only]
StatSizeInt64. Return the total size of the file representing this fd, as determined by stat().

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

static
AdoptFd(Int32) : ParcelFileDescriptor
Take ownership of a raw native fd in to a new ParcelFileDescriptor.
CanDetectErrors() : Boolean
Indicates if this ParcelFileDescriptor can communicate and detect remote errors/crashes.
CheckError()
Detect and throw if the other end of a pipe or socket pair encountered an error or crashed.
Close()
Close the ParcelFileDescriptor.
CloseWithError(String)
Close the ParcelFileDescriptor, informing any peer that an error occurred while processing.
static
CreatePipe() : ParcelFileDescriptor[]
Create two ParcelFileDescriptors structured as a data pipe.
static
CreateReliablePipe() : ParcelFileDescriptor[]
Create two ParcelFileDescriptors structured as a data pipe.
static
CreateReliableSocketPair() : ParcelFileDescriptor[]
Create two ParcelFileDescriptors structured as a pair of sockets connected to each other.
static
CreateSocketPair() : ParcelFileDescriptor[]
Create two ParcelFileDescriptors structured as a pair of sockets connected to each other.
DescribeContents() : Int32
Describe the kinds of special objects contained in this Parcelable's marshalled representation.
DetachFd() : Int32
Return the native fd int for this ParcelFileDescriptor and detach it from the object here.
Dup() : ParcelFileDescriptor
Create a new ParcelFileDescriptor that is a dup of the existing FileDescriptor.
static
Dup(FileDescriptor) : ParcelFileDescriptor
Create a new ParcelFileDescriptor that is a dup of an existing FileDescriptor.
static
FromDatagramSocket(DatagramSocket) : ParcelFileDescriptor
Create a new ParcelFileDescriptor from the specified DatagramSocket.
static
FromFd(Int32) : ParcelFileDescriptor
Create a new ParcelFileDescriptor from a raw native fd.
static
FromSocket(Socket) : ParcelFileDescriptor
Create a new ParcelFileDescriptor from the specified Socket.
static
Open(File, ParcelFileMode) : ParcelFileDescriptor
Create a new ParcelFileDescriptor accessing a given file.
static
Open(File, ParcelFileMode, Handler, ParcelFileDescriptor+IOnCloseListener) : ParcelFileDescriptor
Create a new ParcelFileDescriptor accessing a given file.
static
ParseMode(String) : ParcelFileMode
Converts a string representing a file mode, such as "rw", into a bitmask suitable for use with ParcelFileDescriptor.Open(File,ParcelFileMode).
WriteToParcel(Parcel, ParcelableWriteFlags)
Flatten this object in to a Parcel.