Here you can find the source of parserURIQuery(String queryText)
public static HashMap<String, String> parserURIQuery(String queryText)
//package com.java2s; import java.net.URLDecoder; import java.util.HashMap; public class Main { public static HashMap<String, String> parserURIQuery(String queryText) { HashMap<String, String> resultMap = new HashMap<String, String>(); StringBuilder stringBuilder = new StringBuilder(); String key = null;/*from w ww .j av a 2 s.c o m*/ for (int index = 0; index < queryText.length(); index++) { char token = queryText.charAt(index); switch (token) { case '=': key = stringBuilder.toString(); stringBuilder.delete(0, stringBuilder.length()); break; case '&': resultMap.put(key, URLDecoder.decode(stringBuilder.toString())); key = null; stringBuilder.delete(0, stringBuilder.length()); break; default: stringBuilder.append(token); } } if (stringBuilder.length() != 0 && key != null) { resultMap.put(key, URLDecoder.decode(stringBuilder.toString())); } return resultMap; } }