AssetManager.Open Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Open(String) |
Open an asset using ACCESS_STREAMING mode. |
Open(String, Access) |
Open an asset using an explicit access mode, returning an InputStream to read its contents. |
Open(String)
Open an asset using ACCESS_STREAMING mode.
[Android.Runtime.Register("open", "(Ljava/lang/String;)Ljava/io/InputStream;", "")]
public System.IO.Stream Open (string fileName);
[<Android.Runtime.Register("open", "(Ljava/lang/String;)Ljava/io/InputStream;", "")>]
member this.Open : string -> System.IO.Stream
Parameters
- fileName
- String
The name of the asset to open. This name can be hierarchical.
Returns
- Attributes
Exceptions
Remarks
Open an asset using ACCESS_STREAMING mode. This provides access to files that have been bundled with an application as assets -- that is, files placed in to the "assets" directory.
Java documentation for android.content.res.AssetManager.open(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.
See also
- <xref:Android.Content.Res.AssetManager.Open(System.String%2c+Android.Content.Res.Access)>
- List(String)
Applies to
Open(String, Access)
Open an asset using an explicit access mode, returning an InputStream to read its contents.
[Android.Runtime.Register("open", "(Ljava/lang/String;I)Ljava/io/InputStream;", "")]
public System.IO.Stream Open (string fileName, Android.Content.Res.Access accessMode);
[<Android.Runtime.Register("open", "(Ljava/lang/String;I)Ljava/io/InputStream;", "")>]
member this.Open : string * Android.Content.Res.Access -> System.IO.Stream
Parameters
- fileName
- String
The name of the asset to open. This name can be hierarchical.
- accessMode
- Access
Desired access mode for retrieving the data.
Returns
- Attributes
Exceptions
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.
Java documentation for android.content.res.AssetManager.open(java.lang.String, int)
.
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.