다음을 통해 공유


URI.ToURL Method

Definition

Constructs a URL from this URI.

[Android.Runtime.Register("toURL", "()Ljava/net/URL;", "")]
public Java.Net.URL? ToURL ();
[<Android.Runtime.Register("toURL", "()Ljava/net/URL;", "")>]
member this.ToURL : unit -> Java.Net.URL

Returns

URL

A URL constructed from this URI

Attributes

Exceptions

if an error occurs while creating the URL or no protocol handler could be found.

Remarks

Constructs a URL from this URI.

This convenience method works as if invoking it were equivalent to evaluating the expression new URL(this.toString()) after first checking that this URI is absolute.

Java documentation for java.net.URI.toURL().

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