public final class URLs
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static java.util.Map<java.lang.String,java.net.URLStreamHandler> |
handlerMap
The mapping between WebPane-specific protocol names and their
respective handlers.
|
private static java.security.Permission |
streamHandlerPermission |
Modifier | Constructor and Description |
---|---|
private |
URLs()
The private default constructor.
|
Modifier and Type | Method and Description |
---|---|
static java.net.URL |
newURL(java.lang.String spec)
Creates a
URL object from the String representation. |
static java.net.URL |
newURL(java.net.URL context,
java.lang.String spec)
Creates a URL by parsing the given spec within a specified context.
|
private static final java.util.Map<java.lang.String,java.net.URLStreamHandler> handlerMap
private static final java.security.Permission streamHandlerPermission
private URLs()
public static java.net.URL newURL(java.lang.String spec) throws java.net.MalformedURLException
URL
object from the String
representation.
This method is equivalent to the URL(String)
constructor
with the additional support for WebPane-specific protocol handlers.spec
- the String
to parse as a URL
.java.net.MalformedURLException
- if the string specifies an unknown
protocol.public static java.net.URL newURL(java.net.URL context, java.lang.String spec) throws java.net.MalformedURLException
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
.java.net.MalformedURLException
- if no protocol is specified, or an
unknown protocol is found.