package com.walker.pay.allinpaycloud.util;
|
|
import com.walker.infrastructure.utils.StringUtils;
|
|
import java.io.UnsupportedEncodingException;
|
import java.net.URLDecoder;
|
|
public class TextUtils {
|
|
/**
|
* 把 x-www-form-urlencoded方式 传送的参数解码成普通字符串。
|
* @param raw
|
* @return
|
* @date 2023-02-26
|
*/
|
public static final String decodeFormUrlParameter(String raw){
|
if(StringUtils.isEmpty(raw)){
|
return null;
|
}
|
try {
|
return URLDecoder.decode(raw, StringUtils.DEFAULT_CHARSET_UTF8);
|
} catch (UnsupportedEncodingException e) {
|
throw new RuntimeException(e);
|
}
|
}
|
}
|