toURL

fun Url.toURL(): URL

Unwraps this Url into a plain java.net. URL, for interop with JVM APIs that require one.

Returns the wrapped JvmUrl.url directly when this is already a JvmUrl (the common case, since parseUrl always produces one); otherwise round-trips through toString and String.toUrl.