Class URIUtils


  • public class URIUtils
    extends Object
    Some utilities for parsing URI's
    Author:
    mshankar
    • Constructor Detail

      • URIUtils

        public URIUtils()
    • Method Detail

      • parseQueryString

        public static HashMap<String,​String> parseQueryString​(URI uri)
                                                             throws IOException
        Parse the query string of a URI (typically used in archiver config strings) and return these as a name value pair hashmap. We do not handle multiple values for the same param in this call; we simply replace previous names.
        Parameters:
        uri - URI
        Returns:
        HashMap Parse the query string
        Throws:
        IOException -  
      • getMultiValuedParamFromQueryString

        public static List<String> getMultiValuedParamFromQueryString​(URI uri,
                                                                      String paramName)
                                                               throws IOException
        If you do expect a param to have multiple values, use this method to get all the possible values for a name.
        Parameters:
        uri - URI
        paramName -  
        Returns:
        multiple values of a param
        Throws:
        IOException -