Class UrlUtils

  • All Implemented Interfaces:

    
    public final class UrlUtils
    
                        
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      static boolean isValidUrl(String stringUrl) Check if the given String is a valid URL.
      static String urlEncode(String unencodedString) Encodes an URL given as String.
      static Map<String, String> extractQueryParameters(String uri) Extras query parameters as a Map
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • isValidUrl

         static boolean isValidUrl(String stringUrl)

        Check if the given String is a valid URL.

        It uses URL class to identify that.

        Parameters:
        stringUrl - URL that needs to be tested
        Returns:

        return a boolean indicating if the given parameter is a valid URL

      • urlEncode

         static String urlEncode(String unencodedString)

        Encodes an URL given as String.

        Parameters:
        unencodedString - nullable String value to be encoded
        Returns:

        the encoded String