Package alpine.util

Class UrlUtil


  • public class UrlUtil
    extends Object
    • Method Detail

      • normalize

        public static String normalize​(String urlString)
        Ensures that trailing slashes in URLs are removed.
        Parameters:
        urlString - The URL string to normalize
        Returns:
        a String of the URL without trailing slashes
        Since:
        1.6.0
      • normalize

        public static URL normalize​(URL url)
                             throws MalformedURLException
        Ensures that trailing slashes in URLs are removed.
        Parameters:
        url - The URL to normalize
        Returns:
        a URL without trailing slashes
        Throws:
        MalformedURLException - when a URL is invalid