Here you can find the source of getQueryMap(URL url)
private static Map<String, String> getQueryMap(URL url)
//package com.java2s; //License from project: Open Source License import java.net.URL; import java.util.HashMap; import java.util.Map; public class Main { private static Map<String, String> getQueryMap(URL url) { String query = url.getQuery(); String[] params = query.split("&"); Map<String, String> map = new HashMap<String, String>(); for (String param : params) { try { String name = param.split("=")[0]; String value = param.split("=")[1]; map.put(name, value);/* w w w .j a v a 2 s.c o m*/ } catch (Exception e) { // malformed url params, just ignore } } return map; } }