public static Map<String,String> parseQueryString(String queryString,String charset) throws UnsupportedEncodingException {
  if (StringUtils.isEmpty(queryString)) {
    return new HashMap<>();
  }
  String[] params=queryString.split("&");
  Map<String,String> map=new HashMap<>();
  for (  String param : params) {
    String[] pair=param.split("=");
    if (pair.length == 2) {
      String name=pair[0];
      String value=charset == null ? pair[1] : URLDecoder.decode(pair[1],charset);
      map.put(name,value);
    }
  }
  return map;
}

public static Map < String , String > parseQueryString ( String queryString , String charset ) throws UnsupportedEncodingException { if ( StringUtils . isEmpty ( queryString ) ) { return new HashMap < > ( ) ; } String [ ] params = queryString . split ( "&" ) ; Map < String , String > map = new HashMap < > ( ) ; for ( String param : params ) { String [ ] pair = param . split ( "=" ) ; if ( pair . length == 2 ) { String name = pair [ 0 ] ; String value = charset == null ? pair [ 1 ] : URLDecoder . decode ( pair [ 1 ] , charset ) ; map . put ( name , value ) ; } } return map ; }
parses parameters from the query string
