语言

AssetManager.OpenFd(String) 方法

定义

通过应用未压缩的资产并返回一个 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

参数

fileName
String

要打开的资产的名称。 此名称可以是分层名称。

返回

打开的 AssetFileDescriptor。

特性

例外

注解

通过应用未压缩的资产并返回一个 AssetFileDescriptor。 这提供对作为资产与应用程序捆绑的文件的访问权限,即放入“assets”目录的文件。

资产必须未压缩,否则将引发异常。

Java文档android.content.res.AssetManager.openFd(java.lang.String)。

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于