public class URIUtil
extends java.lang.Object
| Constructor and Description |
|---|
URIUtil() |
| Modifier and Type | Method and Description |
|---|---|
static java.net.URI |
append(java.net.URI base,
java.lang.String extension)
Appends the given extension to the path of the give base URI and returns
the corresponding new path.
|
static java.net.URI |
fromString(java.lang.String uriString)
Returns a URI corresponding to the given unencoded string.
|
static boolean |
sameURI(java.net.URI url1,
java.net.URI url2) |
static java.io.File |
toFile(java.net.URI uri)
Returns the URI as a local file, or
null if the given
URI does not represent a local file. |
static java.lang.String |
toUnencodedString(java.net.URI uri)
Returns a string representation of the given URI that doesn't have illegal
characters encoded.
|
static java.net.URI |
toURI(java.net.URL url)
Returns the URL as a URI.
|
static java.net.URL |
toURL(java.net.URI uri)
Returns a URI as a URL.
|
public static java.net.URI append(java.net.URI base,
java.lang.String extension)
base - The base URI to append toextension - The path extension to be addedpublic static java.net.URI fromString(java.lang.String uriString)
throws java.net.URISyntaxException
java.net.URISyntaxException - If the string cannot be formed into a valid URIpublic static boolean sameURI(java.net.URI url1,
java.net.URI url2)
public static java.io.File toFile(java.net.URI uri)
null if the given
URI does not represent a local file.uri - The URI to return the file fornullpublic static java.lang.String toUnencodedString(java.net.URI uri)
fromString(String).uri - The URI to convert to string formatpublic static java.net.URI toURI(java.net.URL url)
throws java.net.URISyntaxException
java.net.URISyntaxExceptionpublic static java.net.URL toURL(java.net.URI uri)
throws java.net.MalformedURLException
java.net.MalformedURLException