Package com.nimbusds.oauth2.sdk.util
Class URIUtils
- java.lang.Object
-
- com.nimbusds.oauth2.sdk.util.URIUtils
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static URI
getBaseURI(URI uri)
Gets the base part (schema, host, port and path) of the specified URI.static URI
removeTrailingSlash(URI uri)
Removes the trailing slash ("/") from the specified URI, if present.static URI
stripQueryString(URI uri)
Strips the query string from the specified URI.
-
-
-
Method Detail
-
getBaseURI
public static URI getBaseURI(URI uri)
Gets the base part (schema, host, port and path) of the specified URI.- Parameters:
uri
- The URI. May benull
.- Returns:
- The base part of the URI,
null
if the original URI isnull
or doesn't specify a protocol.
-
stripQueryString
public static URI stripQueryString(URI uri)
Strips the query string from the specified URI.- Parameters:
uri
- The URI. May benull
.'- Returns:
- The URI with stripped query string,
null
if the original URI isnull
or doesn't specify a protocol.
-
removeTrailingSlash
public static URI removeTrailingSlash(URI uri)
Removes the trailing slash ("/") from the specified URI, if present.- Parameters:
uri
- The URI. May benull
.- Returns:
- The URI with no trailing slash,
null
if the original URI isnull
.
-
-