Java URL Decode pathDecode(String path)

Here you can find the source of pathDecode(String path)

Description

path Decode

License

Apache License

Declaration

public static String pathDecode(String path) throws UnsupportedEncodingException 

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 pathDecode(String path) throws UnsupportedEncodingException {
        if (path != null) {
            path = path.replace("+", "%2b");
            path = URLDecoder.decode(path, "UTF-8");
        }/* www  .j  ava  2  s  . co m*/
        return path;
    }
}

Related

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