| Modifier and Type | Field and Description |
|---|---|
static String |
PROTOCOL_FILE |
static String |
PROTOCOL_JAR |
| Modifier and Type | Method and Description |
|---|---|
static URL |
appendEncodedPath(URL url,
String path)
Appends the URL-encoded
path to the given base url. |
static URL |
appendNonEncodedPath(URL url,
String path)
Appends the plain
path to the given base url. |
static URL |
canonicalizeURL(URL url)
Turns the given
url into a canonical form. |
static File |
getFile(URL url) |
static File |
getFileFromJarUrl(URL url)
Gets the File referencing the JAR.
|
static URL |
getFileUrlFromJarUrl(URL url)
Removes the 'jar:'-prefix and the '!...'-suffix in order to unwrap the 'file:'-URL pointing to the JAR.
|
static URI |
urlToUri(URL url)
Convert an URL to an URI.
|
public static final String PROTOCOL_FILE
public static final String PROTOCOL_JAR
public static URL canonicalizeURL(URL url)
url into a canonical form.
url - the URL to be canonicalized. May be null.null, unless the given url
is null.public static URL appendEncodedPath(URL url, String path)
path to the given base url.
This method does not use URLEncoder, because of
JERSEY-417.
url - the URL to be appended. Must not be null.path - the path to append. May be null. It is assumed that this
path is already encoded. It is therefore not modified at all and appended
as-is.url and the suffix path.appendNonEncodedPath(URL, String)public static URL appendNonEncodedPath(URL url, String path)
path to the given base url.
Each path segment (the text between '/') is separately URL-encoded. A '/' itself is therefore conserved and not encoded.
url - the URL to be appended. Must not be null.path - the path to append. May be null.url and the suffix path.appendEncodedPath(URL, String)public static final URI urlToUri(URL url)
url - The URL to cenvertpublic static File getFileFromJarUrl(URL url)
url - the url to be unwrapped. Must not be null. Must be a JAR-URL (i.e. protocol must be PROTOCOL_JAR)!public static URL getFileUrlFromJarUrl(URL url)
url - the url to be unwrapped. Must not be null. Must be a JAR-URL (i.e. protocol must be PROTOCOL_JAR)!Copyright © 2013–2019. All rights reserved.