Java URL Decode safeDecode(String s)

Here you can find the source of safeDecode(String s)

Description

safe Decode

License

Apache License

Declaration

public static String safeDecode(String s) 

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 safeDecode(String s) {
        try {//  w  ww .j av a2 s.c om
            return URLDecoder.decode(s, "UTF-8");
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
            return s;
        }
    }
}

Related

  1. parseStringParamAndDecode(String inParam, String defaultVal, String charset)
  2. pathDecode(String path)
  3. pathDecode(String path)
  4. percentDecode(String encodedString, String messageEncoding)
  5. percentDecode(String str, boolean plusToSpace)
  6. unescape(String s)
  7. unescape(String string)
  8. unescape(String theString)
  9. urlDecode(String s)