Modifier and Type | Method and Description |
---|---|
static URI |
create(String scheme,
String rawUserInfo,
String host,
int port,
String rawPath,
String rawQuery,
String rawFragment)
Returns a hierarchical URI constructed from the given components.
|
static URI |
rebase(URI uri,
URI base)
Changes the base scheme, host and port of a request to that specified in a base URI,
or leaves them unchanged if the base URI is
null . |
static URI |
withoutQueryAndFragment(URI uri)
Returns a new URI having the same scheme, authority and path, but no
query nor fragment.
|
static URI |
withQuery(URI uri,
Form query)
Returns a new URI having the provided query parameters.
|
public static URI create(String scheme, String rawUserInfo, String host, int port, String rawPath, String rawQuery, String rawFragment) throws URISyntaxException
scheme
- the scheme component of the URI or null
if none.rawUserInfo
- the raw user-information component of the URI or null
if none.host
- the host component of the URI or null
if none.port
- the port number of the URI or -1
if none.rawPath
- the raw path component of the URI or null
if none.rawQuery
- the raw query component of the URI or null
if none.rawFragment
- the raw fragment component of the URI or null
if none.URISyntaxException
- if the resulting URI would be malformed per RFC 2396.public static URI rebase(URI uri, URI base)
null
. This implementation only
uses scheme, host and port. The remaining components of the URI remain intact.uri
- the URI whose base is to be changed.base
- the URI to base the other URI on.public static URI withQuery(URI uri, Form query)
uri
- the URI whose query is to be changed.query
- the form containing the query parameters.public static URI withoutQueryAndFragment(URI uri)
uri
- the URI whose query and fragments are to be removed.Copyright © 2014 ForgeRock AS. All rights reserved.