Here you can find the source of joinArgs(Map
public static final String joinArgs(Map<String, String> map, String sep, String split)
//package com.java2s; //License from project: Open Source License import java.util.Map; public class Main { public static final String joinArgs(Map<String, String> map, String sep, String split) { StringBuilder sb = new StringBuilder(); for (String key : map.keySet()) { sb.append(key);//from w w w . j a v a2s . c om sb.append(split); sb.append(map.get(key)); sb.append(sep); } if (sb.length() > 0) { sb.setLength(sb.length() - 1); } return sb.toString(); } public static final String joinArgs(Map<String, String> map, char sep, char split) { StringBuilder sb = new StringBuilder(); for (String key : map.keySet()) { sb.append(key); sb.append(split); sb.append(map.get(key)); sb.append(sep); } if (sb.length() > 0) { sb.setLength(sb.length() - 1); } return sb.toString(); } }