code: public static Map<String, String> getQueryMap(String query) throws UnsupportedEncodingException 
      {
          String[] params = query.split("&");
          Map<String, String> map = new HashMap<String, String>();
          for (String param : params)
          {
              String[] keyValue = param.split("=");
              map.put(keyValue[0], URLDecoder.decode(keyValue[1],"UTF-8"));
          }
          return map;
      }
docs: decompose the query to store the parameters in a map