public final class URLUtils extends Object
Constructor and Description |
---|
URLUtils() |
Modifier and Type | Method and Description |
---|---|
static URL |
construct(String url)
Construct a
java.net.URL on the basis of a String, and incapsulating the MalformedURLException . |
static URL |
construct(String name,
String url)
Construct a
java.net.URL on the basis of a String, and incapsulating the MalformedURLException . |
public static final URL construct(String url)
java.net.URL
on the basis of a String, and incapsulating the MalformedURLException
. url
- the url as a stringnull
, empty or an invalid URL null
is returned, otherwise a instance of URL.public static final URL construct(String name, String url)
java.net.URL
on the basis of a String, and incapsulating the MalformedURLException
. name
- the property/configuration etc, the URL string belong to, used to get a more specified stacktrace if it failsurl
- the url as a stringnull
, empty or an invalid URL null
is returned, otherwise a instance of URL.