Here you can find the source of getQueryParameters(URI uri)
public static Map<String, String> getQueryParameters(URI uri)
//package com.java2s; /*/*from ww w .ja v a 2 s. c om*/ * Copyright (c) 2013. betterFORM Project - http://www.betterform.de * Licensed under the terms of BSD License */ import java.net.URI; import java.util.Collections; import java.util.LinkedHashMap; import java.util.Map; public class Main { private static final String AMPF = "&"; private static final String EQ = "="; public static Map<String, String> getQueryParameters(URI uri) { if (null == uri || null == uri.getQuery()) { return Collections.emptyMap(); } Map<String, String> result = new LinkedHashMap<String, String>(); for (String pair : uri.getQuery().split(AMPF)) { if (1 > pair.indexOf(EQ)) { result.put(pair, null); } else { String[] kv = pair.split(EQ); result.put(kv[0], kv[1]); } } return result; } }