public static Map<String,Set<String>> parse(final URI uri,final String encoding){
  Map<String,Set<String>> result=Collections.emptyMap();
  final String query=uri.getRawQuery();
  if (query != null && query.length() > 0) {
    result=new HashMap<>();
    parse(result,new Scanner(query),encoding,true);
  }
  return result;
}

public static Map < String , Set < String > > parse ( final URI uri , final String encoding ) { Map < String , Set < String > > result = Collections . emptyMap ( ) ; final String query = uri . getRawQuery ( ) ; if ( query != null && query . length ( ) > 0 ) { result = new HashMap < > ( ) ; parse ( result , new Scanner ( query ) , encoding , true ) ; } return result ; }
returns map < string , set < string > > as built from the uri ' s query portion . for example , a uri of http : / / example . org / path / to / file ? a = 1 & b = 2 & c = 3 & c = 4 would return a map three key is a name name of parameter set < string > is a values , a = { 1 } , one for b = { 2 } and two for c = { 3 , 4 } . < p / > < p / > this is typically useful while parsing an http put .
