Java URL Decode decode(String value, String charset)

Here you can find the source of decode(String value, String charset)

Description

decode

License

Apache License

Declaration

public static String decode(String value, String charset) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;

public class Main {
    public static String decode(String value) {
        return decode(value, "UTF-8");
    }/*from  w w  w.  ja va 2 s.  c  o m*/

    public static String decode(String value, String charset) {
        String decoded = null;

        try {
            decoded = URLDecoder.decode(value, charset);
        } catch (UnsupportedEncodingException e) {
            decoded = null;
        }

        return decoded;
    }
}

Related

  1. decode(String str)
  2. decode(String value)
  3. decode(String value)
  4. decode(String value)
  5. decode(String value)
  6. decode(String value, String charset)
  7. decode(String value, String encoding)
  8. decodeAjax(String value)
  9. decodeAjaxParam(final String source)