Java URL Decode decodeStr(String str)

Here you can find the source of decodeStr(String str)

Description

decode Str

License

Open Source License

Declaration

public static final String decodeStr(String str) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

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

public class Main {
    public static final String ENCODE_CHARACTERSET = "UTF-8";

    public static final String decodeStr(String str) {

        try {//from w  w w  . j a v  a  2s .c o  m
            str = URLDecoder.decode(str, ENCODE_CHARACTERSET);
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }

        return str;
    }
}

Related

  1. decodePercent(String str)
  2. decodeRequestBody(String requestBody)
  3. decodeRequestString2(String inputString)
  4. decodeRfc5849(final String value)
  5. decodeSpecialMdxCharactersInNames(String name)
  6. decodeString(String cookedTextString)
  7. decodeString(String myString)
  8. decodeStringByUTF8(String str)
  9. decodeStringFields(Object objBean, String code)