package com.talker;
import java.io.UnsupportedEncodingException;
public class GetStringtype {
public String ifnull(String str){
if(str==null){
return "";
}
return str;
}
public String toStringtype(String str){
str=ifnull(str);
String newstr ="";
try {
newstr =new String(str.getBytes("iso-8859-1"),"gbk");
} catch (UnsupportedEncodingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return newstr;
}
}
评论15
最新资源