Sdílet prostřednictvím


ClassLoader.GetResourceAsStream(String) Method

Definition

Returns an input stream for reading the specified resource.

[Android.Runtime.Register("getResourceAsStream", "(Ljava/lang/String;)Ljava/io/InputStream;", "GetGetResourceAsStream_Ljava_lang_String_Handler")]
public virtual System.IO.Stream? GetResourceAsStream (string? name);
[<Android.Runtime.Register("getResourceAsStream", "(Ljava/lang/String;)Ljava/io/InputStream;", "GetGetResourceAsStream_Ljava_lang_String_Handler")>]
abstract member GetResourceAsStream : string -> System.IO.Stream
override this.GetResourceAsStream : string -> System.IO.Stream

Parameters

name
String

The resource name

Returns

An input stream for reading the resource, or null if the resource could not be found

Attributes

Remarks

Returns an input stream for reading the specified resource.

The search order is described in the documentation for #getResource(String).

Added in 1.1.

Java documentation for java.lang.ClassLoader.getResourceAsStream(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

See also