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 URIgetBaseURI(URI uri)Gets the base part (schema, host, port and path) of the specified URI.static URIremoveTrailingSlash(URI uri)Removes the trailing slash ("/") from the specified URI, if present.static URIstripQueryString(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,
nullif the original URI isnullor 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,
nullif the original URI isnullor 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,
nullif the original URI isnull.
-
-