Android Guides | Samples

Android.Content.Res.AssetManager.Open Method

Open an asset using an explicit access mode, returning an InputStream to read its contents.

Syntax

[Android.Runtime.Register("open", "(Ljava/lang/String;I)Ljava/io/InputStream;", "")]
public Stream Open (String fileName, [Android.Runtime.GeneratedEnum] Access accessMode)

See Also

Parameters

fileName
The name of the asset to open. This name can be hierarchical.
accessMode
Desired access mode for retrieving the data.

Exceptions

TypeReason
IOException

Remarks

Open an asset using an explicit access mode, returning an InputStream to read its contents. This provides access to files that have been bundled with an application as assets -- that is, files placed in to the "assets" directory.

[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