URIs, to workaround
bugs within the class or for ease-of-use features.
| Modifier and Type | Class and Description |
|---|---|
| public static enum | URIUtils.UriFlag
Flags that control how URI is being rewritten. |
| Modifier and Type | Field and Description |
|---|---|
| public static final EnumSet | DROP_FRAGMENT
Set of uri flags containing |
| public static final EnumSet | DROP_FRAGMENT_AND_NORMALIZE
Set of uri flags containing |
| public static final EnumSet | NO_FLAGS
Empty set of uri flags. |
| public static final EnumSet | NORMALIZE
Set of uri flags containing |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static URI | |
| public static HttpHost | Returns: the target host if the URI is absolute ornull if the URI is
relative or does not contain a valid host name.Extracts target host from the given |
| public static URI | Returns: the URI without dot segmentsthe original URI uri)Removes dot segments according to RFC 3986, section 5.2.4 and Syntax-Based Normalization according to RFC 3986, section 6.2.2. |
| public static URI | |
| public static URI | |
| public static URI | Returns: interpreted (absolute) URIoriginal request before any redirects originalURI, final HttpHost if the last URI is relative, it is resolved against this target,
or target, final List<URI> null if not available.collection of redirect locations since the original request
or redirects)null if not available.Derives the interpreted (absolute) URI that was used to generate the last request. |
| public static URI | rewriteURI(final URI
Contains the path, query and fragment to use. uri, final HttpHost Contains the scheme, host and port to use. target, final boolean True if the fragment should not be copied. dropFragment)
Deprecated
(4.5.8) Use
A convenience method for creating a new rewriteURI(URI, HttpHost, EnumSet)
URI whose scheme, host
and port are taken from the target host, but whose path, query and
fragment are taken from the existing URI.
|
| public static URI | rewriteURI(final URI
Contains the path, query and fragment to use. uri, final HttpHost Contains the scheme, host and port to use. target, final EnumSet<URIUtils.True if the fragment should not be copied. flagsA convenience method for creating a new |
| public static URI | rewriteURI(final URI uri, final HttpHost target)
A convenience method for
|
| public static URI | rewriteURI(final URI
original URI. uri)A convenience method that creates a new |
| public static URI | rewriteURIForRoute(final URI
original URI. uri, final RouteInfo route)A convenience method that optionally converts the original |
| public static URI | rewriteURIForRoute(final URI
original URI. uri, final RouteInfo route, final boolean normalizeUri)A convenience method that optionally converts the original |
| DROP_FRAGMENT | back to summary |
|---|---|
| public static final EnumSet<URIUtils. Set of uri flags containing
| |
| DROP_FRAGMENT_AND_NORMALIZE | back to summary |
|---|---|
| public static final EnumSet<URIUtils. Set of uri flags containing
| |
| NO_FLAGS | back to summary |
|---|---|
| public static final EnumSet<URIUtils. Empty set of uri flags.
| |
| NORMALIZE | back to summary |
|---|---|
| public static final EnumSet<URIUtils. Set of uri flags containing
| |
| URIUtils | back to summary |
|---|---|
| private URIUtils() This class should not be instantiated. | |
| createURI | back to summary |
|---|---|
| public static URI createURI(final String scheme, final String host, final int port, final String path, final String query, final String fragment) throws URISyntaxException
Deprecated (4.2) use Constructs a
| |
| extractHost | back to summary |
|---|---|
| public static HttpHost extractHost(final URI uri) Extracts target host from the given
| |
| normalizeSyntax | back to summary |
|---|---|
| public static URI normalizeSyntax(final URI uri) throws URISyntaxException Removes dot segments according to RFC 3986, section 5.2.4 and Syntax-Based Normalization according to RFC 3986, section 6.2.2. | |
| resolve | back to summary |
|---|---|
| public static URI resolve(final URI baseURI, final String reference) Resolves a URI reference against a base URI. Work-around for bug in java.net.URI (http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4708535) | |
| resolve | back to summary |
|---|---|
| public static URI resolve(final URI baseURI, final URI reference) Resolves a URI reference against a base URI. Work-around for bugs in java.net.URI (e.g. http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4708535) | |
| resolve | back to summary |
|---|---|
| public static URI resolve(final URI originalURI, final HttpHost target, final List<URI> redirects) throws URISyntaxException Derives the interpreted (absolute) URI that was used to generate the last
request. This is done by extracting the request-uri and target origin for
the last request and scanning all the redirect locations for the last
fragment identifier, then combining the result into a
| |
| rewriteURI | back to summary |
|---|---|
| public static URI rewriteURI(final URI uri, final HttpHost target, final boolean dropFragment) throws URISyntaxException
Deprecated (4.5.8) Use A convenience method for creating a new
| |
| rewriteURI | back to summary |
|---|---|
| public static URI rewriteURI(final URI uri, final HttpHost target, final EnumSet<URIUtils. A convenience method for creating a new | |
| rewriteURI | back to summary |
|---|---|
| public static URI rewriteURI(final URI uri, final HttpHost target) throws URISyntaxException A convenience method for
| |
| rewriteURI | back to summary |
|---|---|
| public static URI rewriteURI(final URI uri) throws URISyntaxException A convenience method that creates a new
| |
| rewriteURIForRoute | back to summary |
|---|---|
| public static URI rewriteURIForRoute(final URI uri, final RouteInfo route) throws URISyntaxException A convenience method that optionally converts the original
| |
| rewriteURIForRoute | back to summary |
|---|---|
| public static URI rewriteURIForRoute(final URI uri, final RouteInfo route, final boolean normalizeUri) throws URISyntaxException A convenience method that optionally converts the original
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final URIUtils. | |
| public static final URIUtils. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static URIUtils. | |
| public static URIUtils. |
| DROP_FRAGMENT | back to summary |
|---|---|
| public static final URIUtils. | |
| NORMALIZE | back to summary |
|---|---|
| public static final URIUtils. | |
| UriFlag | back to summary |
|---|---|
| private UriFlag() | |
| valueOf | back to summary |
|---|---|
| public static URIUtils. | |
| values | back to summary |
|---|---|
| public static URIUtils. | |