Class URLs


  • public final class URLs
    extends Object
    A collection of utility methods for working with URLs.
    • Method Detail

      • parseQueryParameters

        public static Map<String,​String> parseQueryParameters​(String query)
        Parses a url query string into a map of query parameters
        Parameters:
        query - the query string
        Returns:
        a map of parameters
      • parseMultiQueryParameters

        public static Map<String,​List<String>> parseMultiQueryParameters​(String query)
        Parses a url query string into a map of query parameters
        Parameters:
        query - the query string
        Returns:
        a map of parameters
      • encodeQueryParameters

        public static String encodeQueryParameters​(Map<String,​String> options)
        Encodes a map of query parameters into a query string
        Parameters:
        options - the query parameters
        Returns:
        a query string or null if the map is an empty map
      • encodeMultiQueryParameters

        public static String encodeMultiQueryParameters​(Map<String,​List<String>> options)
        Encodes a map of query parameters into a query string
        Parameters:
        options - the query parameters
        Returns:
        a query string or null if the map is an empty map