code: public static Map<String, String> getQueryParams(String uri, String encoding) throws URISyntaxException, UnsupportedEncodingException{
          if(encoding==null)
              encoding = IOUtil.UTF_8.name();
  
          String query = new URI(uri).getRawQuery();
          Map<String, String> map = new HashMap<String, String>();
          StringTokenizer params = new StringTokenizer(query, "&;");
          while(params.hasMoreTokens()){
              String param = params.nextToken();
              int equal = param.indexOf('=');
              String name = param.substring(0, equal);
              String value = param.substring(equal+1);
              name = URLDecoder.decode(name, encoding);
              value = URLDecoder.decode(value, encoding);
              map.put(name, value);
          }
          return map;
      }
docs: returns Query Parameters in specified uri as <code>Map</code>.
  key will be param name and value wil be param value.
  
  @param uri       The string to be parsed into a URI
  @param encoding  if null, <code>UTF-8</code> will be used
  
  @throws URISyntaxException               in case of invalid uri
  @throws UnsupportedEncodingException     if named character encoding is not supported