Java tutorial
//package com.java2s; import java.util.Map; public class Main { private static final String DELIMITER = ":"; private static final String ENTRY_DELIMITER = "="; public static String serializerMap(Map<String, String> map) { StringBuilder builder = new StringBuilder(); for (Map.Entry<String, String> entry : map.entrySet()) { String key = entry.getKey(); String val = entry.getValue(); builder.append(key + ENTRY_DELIMITER + val); builder.append(DELIMITER); } return builder.toString(); } }