Condividi tramite


AssetFileDescriptor.CreateInputStream Method

Definition

Create and return a new auto-close input stream for this asset.

[Android.Runtime.Register("createInputStream", "()Ljava/io/FileInputStream;", "GetCreateInputStreamHandler")]
public virtual System.IO.Stream? CreateInputStream ();
[<Android.Runtime.Register("createInputStream", "()Ljava/io/FileInputStream;", "GetCreateInputStreamHandler")>]
abstract member CreateInputStream : unit -> System.IO.Stream
override this.CreateInputStream : unit -> System.IO.Stream

Returns

Attributes

Exceptions

Remarks

Create and return a new auto-close input stream for this asset. This will either return a full asset AutoCloseInputStream, or an underlying ParcelFileDescriptor.AutoCloseInputStream ParcelFileDescriptor.AutoCloseInputStream depending on whether the the object represents a complete file or sub-section of a file. You should only call this once for a particular asset.

Java documentation for android.content.res.AssetFileDescriptor.createInputStream().

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