Here you can find the source of decode(String value, String charset)
public static String decode(String value, String charset)
//package com.java2s; //License from project: Apache License import java.io.*; import java.net.URLDecoder; public class Main { public static final String DEFAULT_CHARSET = "UTF-8"; public static String decode(String value) { return decode(value, DEFAULT_CHARSET); }//from w ww .j a va2 s. c o m public static String decode(String value, String charset) { String result = null; if (!isEmpty(value)) { try { result = URLDecoder.decode(value, charset); } catch (IOException e) { throw new RuntimeException(e); } } return result; } private static boolean isEmpty(final String str) { return str == null || str.length() == 0; } }