Partager via


AssetManager.OpenFd(String) Method

Definition

Open an uncompressed asset by mmapping it and returning an AssetFileDescriptor.

[Android.Runtime.Register("openFd", "(Ljava/lang/String;)Landroid/content/res/AssetFileDescriptor;", "")]
public Android.Content.Res.AssetFileDescriptor OpenFd (string fileName);
[<Android.Runtime.Register("openFd", "(Ljava/lang/String;)Landroid/content/res/AssetFileDescriptor;", "")>]
member this.OpenFd : string -> Android.Content.Res.AssetFileDescriptor

Parameters

fileName
String

The name of the asset to open. This name can be hierarchical.

Returns

An open AssetFileDescriptor.

Attributes

Exceptions

Remarks

Open an uncompressed asset by mmapping it and returning an AssetFileDescriptor. This provides access to files that have been bundled with an application as assets -- that is, files placed in to the "assets" directory.

The asset must be uncompressed, or an exception will be thrown.

Java documentation for android.content.res.AssetManager.openFd(java.lang.String).

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