Here you can find the source of decodeFormData(String formData)
private static Map<String, String> decodeFormData(String formData) throws UnsupportedEncodingException
//package com.java2s; //License from project: Open Source License import java.io.UnsupportedEncodingException; import java.util.HashMap; import java.util.Map; import java.net.URLDecoder; public class Main { private static Map<String, String> decodeFormData(String formData) throws UnsupportedEncodingException { Map<String, String> decodedFormData = new HashMap<String, String>(); String[] pairs = formData.split("\\&"); for (int i = 0; i < pairs.length; i++) { String[] fields = pairs[i].split("="); String name = URLDecoder.decode(fields[0], "UTF-8"); String value = URLDecoder.decode(fields[1], "UTF-8"); decodedFormData.put(name, value); }/*w ww.ja v a2 s.c o m*/ return decodedFormData; } }