public final class URLs extends Object
| Modifier and Type | Method and Description |
|---|---|
static URL |
newURL(String spec)
Creates a
URL object from the String representation. |
static URL |
newURL(URL context,
String spec)
Creates a URL by parsing the given spec within a specified context.
|
public static URL newURL(String spec) throws MalformedURLException
URL object from the String representation.
This method is equivalent to the URL.URL(String) constructor
with the additional support for WebPane-specific protocol handlers.spec - the String to parse as a URL.MalformedURLException - if the string specifies an unknown
protocol.public static URL newURL(URL context, String spec) throws MalformedURLException
URL.URL(URL,String)
constructor with the additional support for WebPane-specific protocol
handlers.context - the context in which to parse the specification.spec - the String to parse as a URL.MalformedURLException - if no protocol is specified, or an
unknown protocol is found.Copyright © 2025. All rights reserved.