Class UrlUtils


  • public class UrlUtils
    extends Object
    URL handling utilities.
    Author:
    Adrian Herscu
    • Constructor Detail

      • UrlUtils

        public UrlUtils()
    • Method Detail

      • hostOf

        public static String hostOf​(String url)
        Parameters:
        url - the URL
        Returns:
        the host within specified URL
      • isUrl

        public static boolean isUrl​(String url)
        Checks whether specified URL is well-formed.
        Parameters:
        url - the URL to check
        Returns:
        true if URL is well-formed, namely if new URL(url) does not throw MalformedURLException