Class URIUtils

    • 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 be null.
        Returns:
        The base part of the URI, null if the original URI is null 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 be null.'
        Returns:
        The URI with stripped query string, null if the original URI is null 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 be null.
        Returns:
        The URI with no trailing slash, null if the original URI is null.