public static Map<String,String> parseQuerystring(String queryString){
  Map<String,String> map=new HashMap<String,String>();
  if ((queryString == null) || (queryString.equals(""))) {
    return map;
  }
  String[] params=queryString.split("&");
  for (  String param : params) {
    try {
      String[] keyValuePair=param.split("=",2);
      String name=URLDecoder.decode(keyValuePair[0],"UTF-8");
      if (name == "") {
        continue;
      }
      String value=keyValuePair.length > 1 ? URLDecoder.decode(keyValuePair[1],"UTF-8") : "";
      map.put(name,value);
    }
 catch (    UnsupportedEncodingException e) {
    }
  }
  return map;
}

public static Map < String , String > parseQuerystring ( String queryString ) { Map < String , String > map = new HashMap < String , String > ( ) ; if ( ( queryString == null ) || ( queryString . equals ( "" ) ) ) { return map ; } String [ ] params = queryString . split ( "&" ) ; for ( String param : params ) { try { String [ ] keyValuePair = param . split ( "=" , 2 ) ; String name = URLDecoder . decode ( keyValuePair [ 0 ] , "UTF-8" ) ; if ( name == "" ) { continue ; } String value = keyValuePair . length > 1 ? URLDecoder . decode ( keyValuePair [ 1 ] , "UTF-8" ) : "" ; map . put ( name , value ) ; } catch ( UnsupportedEncodingException e ) { } } return map ; }
parse a querystring into a map of key / value pairs .
