|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ebmwebsourcing.easycommons.uri.UriManager
public class UriManager
| Constructor Summary | |
|---|---|
UriManager()
|
|
| Method Summary | |
|---|---|
static java.net.URI |
buildNewURI(java.net.URI referenceUri,
java.lang.String uriSuffix)
Builds an URI from an URI and a suffix. |
static java.net.URI |
filePathToUri(java.lang.String path)
Builds an URL from a string and escape illegal characters. |
static java.net.URL |
filePathToUrl(java.lang.String path)
Builds an URL from a string and escape illegal characters. |
static boolean |
isAbsoluteUri(java.lang.String uriAsString)
Determines whether a string is an absolute URI. |
static java.net.URI |
urlToUri(java.lang.String urlAsString)
Builds an URI from an URL string (with an handle for URLs not compliant with RFC 2396). |
static java.net.URI |
urlToUri(java.net.URL url)
Builds an URI from an URL (with an handle for URLs not compliant with RFC 2396). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UriManager()
| Method Detail |
|---|
public static java.net.URI urlToUri(java.net.URL url)
url -
public static java.net.URI urlToUri(java.lang.String urlAsString)
urlAsString -
public static java.net.URI filePathToUri(java.lang.String path)
path -
public static java.net.URL filePathToUrl(java.lang.String path)
path -
public static java.net.URI buildNewURI(java.net.URI referenceUri,
java.lang.String uriSuffix)
throws java.lang.Exception
This suffix can be an absolute URL, or a relative path with respect to the first URI. In this case, the suffix is resolved with respect to the URI.
If the suffix is already an URL, its is returned.
If the suffix is a relative file path and cannot be resolved, an exception is thrown.
The returned URI is normalized.
referenceUri - the reference URIuriSuffix - the URI suffix (not null)
java.lang.Exception - if the resolution failedpublic static boolean isAbsoluteUri(java.lang.String uriAsString)
uriAsString - the potential URI, as a string
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||