Here you can find the source of decode(String value, String encoding)
Parameter | Description |
---|---|
value | a parameter |
encoding | a parameter |
static String decode(String value, String encoding)
//package com.java2s; import java.io.UnsupportedEncodingException; import java.net.URLDecoder; public class Main { /**// ww w. j a v a 2s.c om * UnsupportedEncodingException -> value returns. * @param value * @param encoding * @return */ static String decode(String value, String encoding) { String decode = null; try { decode = URLDecoder.decode(value, encoding); } catch (UnsupportedEncodingException e) { decode = value; } return decode; } }