Here you can find the source of decode(final String content, final String encoding)
private static String decode(final String content, final String encoding)
//package com.java2s; import java.io.UnsupportedEncodingException; import java.net.URLDecoder; public class Main { private static String decode(final String content, final String encoding) { try {//from ww w . ja v a 2 s . c om return URLDecoder.decode(content, encoding != null ? encoding : "UTF-8"); } catch (UnsupportedEncodingException problem) { throw new IllegalArgumentException(problem); } } }