请问怎样得到一个email的Content-Transfer-Encoding: 8bit 中的8bit这个值,我想根据这个值判断是否需要用下面的格式化代码格式化这个email的内容.
/**
* 格式化文字编码
*/
private String toChinese(String strvalue) throws Exception{ try{
if(strvalue==null)
return "";
else{
strvalue = new String(strvalue.getBytes("ISO8859-1"), "GBK");
return strvalue;
}
}catch(Exception e){
return "";
}
}
/**
* 格式化文字编码
*/
private String toChinese(String strvalue) throws Exception{ try{
if(strvalue==null)
return "";
else{
strvalue = new String(strvalue.getBytes("ISO8859-1"), "GBK");
return strvalue;
}
}catch(Exception e){
return "";
}
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货