Condividi tramite


ClassLoader.GetResources(String) Method

Definition

Finds all the resources with the given name.

[Android.Runtime.Register("getResources", "(Ljava/lang/String;)Ljava/util/Enumeration;", "GetGetResources_Ljava_lang_String_Handler")]
public virtual Java.Util.IEnumeration? GetResources (string? name);
[<Android.Runtime.Register("getResources", "(Ljava/lang/String;)Ljava/util/Enumeration;", "GetGetResources_Ljava_lang_String_Handler")>]
abstract member GetResources : string -> Java.Util.IEnumeration
override this.GetResources : string -> Java.Util.IEnumeration

Parameters

name
String

The resource name

Returns

An enumeration of java.net.URL <tt>URL</tt> objects for the resource. If no resources could be found, the enumeration will be empty. Resources that the class loader doesn't have access to will not be in the enumeration.

Attributes

Exceptions

if an I/O error occurs.

Remarks

Finds all the resources with the given name. A resource is some data (images, audio, text, etc) that can be accessed by class code in a way that is independent of the location of the code.

The name of a resource is a /-separated path name that identifies the resource.

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

Added in 1.2.

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