Android Guides | Samples

Android.Content.Res.AssetFileDescriptor Class

File descriptor of an entry in the AssetManager.

See Also: AssetFileDescriptor

Syntax

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

Remarks

File descriptor of an entry in the AssetManager. This provides your own opened FileDescriptor that can be used to read the data, as well as the offset and length of that entry's data in the file.

[Android Documentation]

Requirements

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

The members of Android.Content.Res.AssetFileDescriptor are listed below.

See Also: Object

Public Constructors

Create a new AssetFileDescriptor from the given values.
Create a new AssetFileDescriptor from the given values.

Protected Constructors

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

Public Fields

Public Properties

[read-only]
static
CreatorIParcelableCreator.
[read-only]
DeclaredLengthInt64. Return the actual number of bytes that were declared when the AssetFileDescriptor was constructed.
[read-only]
ExtrasBundle. Returns any additional details that can be used to interpret the underlying file descriptor.
[read-only]
FileDescriptorFileDescriptor. Returns the FileDescriptor that can be used to read the data in the file.
[read-only]
LengthInt64. Returns the total number of bytes of this asset entry's data.
[read-only]
ParcelFileDescriptorParcelFileDescriptor. The AssetFileDescriptor contains its own ParcelFileDescriptor, which in addition to the normal FileDescriptor object also allows you to close the descriptor when you are done with it.
[read-only]
StartOffsetInt64. Returns the byte offset where this asset entry's data starts.

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

Close()
Convenience for calling getParcelFileDescriptor().close().
CreateInputStream() : Stream
Create and return a new auto-close input stream for this asset.
CreateOutputStream() : Stream
Create and return a new auto-close output stream for this asset.
DescribeContents() : Int32
Describe the kinds of special objects contained in this Parcelable's marshalled representation.
WriteToParcel(Parcel, ParcelableWriteFlags)
Flatten this object in to a Parcel.