Here you can find the source of getUrlParamsByMap(Map
public static String getUrlParamsByMap(Map<String, Object> map)
//package com.java2s; import java.util.Map; public class Main { public static String getUrlParamsByMap(Map<String, Object> map) { if (map == null) { return ""; }//from w w w . j a v a 2s. c o m StringBuffer sb = new StringBuffer(); for (Map.Entry<String, Object> entry : map.entrySet()) { sb.append(entry.getKey() + "=" + entry.getValue()); sb.append("&"); } return sb.toString(); } }