java.lang.Object | |
↳ | org.apache.http.client.utils.URIUtils |
A collection of utilities for URI URIs, to workaround bugs within the class or for ease-of-use features.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a
URI using all the parameters. | |||||||||||
Extracts target host from the given
URI . | |||||||||||
Resolves a URI reference against a base URI.
| |||||||||||
Resolves a URI reference against a base URI.
| |||||||||||
A convenience method for
rewriteURI(URI, HttpHost, boolean) that always keeps the
fragment. | |||||||||||
A convenience method for creating a new
URI whose scheme, host
and port are taken from the target host, but whose path, query and
fragment are taken from the existing URI. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Constructs a URI
using all the parameters. This should be
used instead of
URI(String, String, String, int, String, String, String)
or any of the other URI multi-argument URI constructors.
scheme | Scheme name |
---|---|
host | Host name |
port | Port number |
path | Path |
query | Query |
fragment | Fragment |
URISyntaxException | If both a scheme and a path are given but the path is relative, if the URI string constructed from the given components violates RFC 2396, or if the authority component of the string is present but cannot be parsed as a server-based authority |
---|
Extracts target host from the given URI
.
null if the URI is
relative or does not contain a valid host name.
Resolves a URI reference against a base URI. Work-around for bugs in
java.net.URI (e.g.
baseURI | the base URI |
---|---|
reference | the URI reference |
Resolves a URI reference against a base URI. Work-around for bug in
java.net.URI (
baseURI | the base URI |
---|---|
reference | the URI reference |
A convenience method for
rewriteURI(URI, HttpHost, boolean)
that always keeps the
fragment.
URISyntaxException |
---|
A convenience method for creating a new URI
whose scheme, host
and port are taken from the target host, but whose path, query and
fragment are taken from the existing URI. The fragment is only used if
dropFragment is false.
uri | Contains the path, query and fragment to use. |
---|---|
target | Contains the scheme, host and port to use. |
dropFragment | True if the fragment should not be copied. |
URISyntaxException | If the resulting URI is invalid. |
---|