67,512
社区成员
发帖
与我相关
我的任务
分享
String ss = URLDecoder.decode("%E4%B8%8B","UTF-8");
System.out.println(ss);
public static void main(String[] args) throws Exception {
String str = "E4B88B";
//String str = "E38082";
int len = str.length()/2;
byte[]data = new byte[len];
for(int i = 0;i < len;i++){
String temp = str.substring(2*i,2*(i+1));
data[i]=(byte)Integer.parseInt(temp,16);
}
String newstr = new String(data);
System.out.println(newstr);
}