Here you can find the source of parseQueryStringEx(String queryString)
public static Multimap<String, String> parseQueryStringEx(String queryString) throws UnsupportedEncodingException
//package com.java2s; //License from project: Apache License import java.io.UnsupportedEncodingException; import java.net.URLDecoder; import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.Multimap; public class Main { public static Multimap<String, String> parseQueryStringEx(String queryString) throws UnsupportedEncodingException { Multimap<String, String> result = ArrayListMultimap.create(); if (queryString == null) { return result; }/*from w w w . j a v a2 s. c o m*/ for (String param : queryString.split("&")) { String pair[] = param.split("="); String key = URLDecoder.decode(pair[0], "UTF-8"); String value = ""; if (pair.length > 1) { value = URLDecoder.decode(pair[1], "UTF-8"); } result.put(new String(key), new String(value)); } return result; } }