다음을 통해 공유


ClassLoader.FindResource(String) Method

Definition

Finds the resource with the given name.

[Android.Runtime.Register("findResource", "(Ljava/lang/String;)Ljava/net/URL;", "GetFindResource_Ljava_lang_String_Handler")]
protected virtual Java.Net.URL? FindResource (string? name);
[<Android.Runtime.Register("findResource", "(Ljava/lang/String;)Ljava/net/URL;", "GetFindResource_Ljava_lang_String_Handler")>]
abstract member FindResource : string -> Java.Net.URL
override this.FindResource : string -> Java.Net.URL

Parameters

name
String

The resource name

Returns

URL

URL object for reading the resource; null if the resource could not be found, a URL could not be constructed to locate the resource, the resource is in a package that is not opened unconditionally, or access to the resource is denied by the security manager.

Attributes

Remarks

Finds the resource with the given name. Class loader implementations should override this method.

Added in 1.2.

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