一、有点邮件内容实现将所有的内容都编码成base64的形式 ,例如以下:
Content-Type: multipart/mixed;
boundary="----=_Part_38010383_649138020.1423298961014"
------=_Part_38010383_649138020.1423298961014
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: base64
PGh0bWw+CiA8aGVhZD48L2hlYWQ+CiA8Ym9keT4KICA8ZGl2PiAKICAgPHRhYmxlIGFsaWduPSJj
ZW50ZXIiIGJvcmRlcj0iMCIgY2VsbHBhZGRpbmc9IjAiIGNlbGxzcGFjaW5nPSIwIiBoZWlnaHQ9
IjYwIiBzdHlsZT0ibWFyZ2luOjAgYXV0bztib3JkZXItY29sbGFwc2U6Y29sbGFwc2U7Y29sb3I6
IzMzMzsiIHdpZHRoPSI2OTAiPiAKICAgIDx0cj4gCiAgICAgPHRkIGFsaWduPSJsZWZ0IiByb3dz
cGFuPSIyIiB3aWR0aD0iMTkzIj48YSBocmVmPSJodHRwOi8vbWFpbC5zdW5pbmcuY29tL3UuaHRt
bD91aWQ9MTQmdGlkPTU4JnN0PTE0MjMyOTg5NTEmZWlkPTg5Nzc0MjYyJnNpZD0wJmRpZD1xcSZn
aWQ9MSZ0ZXN0PTAmZWw9MTM2MDg3NDY5N0BxcS5jb20mZXRhZz0mdXJsPX40MCIgdGFyZ2V0PSJf
YmxhbmsiPjxpbWcgYm9yZGVyPSIwIiBzcmM9Imh0dHA6Ly9waG90by5jbnN1bmluZy5jb20vdGVz
dC9maW5hbF9lbWFpbC9jc3MvaW1hZ2VzL2xvZ28ucG5nIiAvPjwvYT48L3RkPiAKICAgICA8dGQg
cm93c3Bhbj0iMiIgd2lkdGg9IjMwIj48L3RkPiAKICAgICA8dGQgY29sc3Bhbj0iNCIgaGVpZ2h0
PSIzMCI+PC90ZD4gCiAgICAgPHRkIGNvbHNwYW49IjUiIGhlaWdodD0iMzAiPjwvdGQ+IAogICAg
PC90cj4gCiAgICA8dHI+IAogICAgIDx0ZCBoZWlnaHQ9IjI5IiBzdHlsZT0iZm9udC1zaXplO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9IjAiIHNyYz0iaHR0cDovL21haWwuc3VuaW5nLmNvbS9zLmh0bWw/dWlkPTE0JnRpZD01OCZz
dD0xNDIzMjk4OTUxJmVpZD04OTc3NDI2MiZzaWQ9MCZkaWQ9cXEmZ2lkPTEmdGVzdD0wJmVsPTEz
NjA4NzQ2OTdAcXEuY29tJmV0YWc9IiAvPgogPC9ib2R5Pgo8L2h0bWw+
------=_Part_38010383_649138020.1423298961014--
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: base64
这段信息表示这封邮件原先是采用utf-8的编码,然后转换成base64编码进行传输,base64编码的目的是便于传输,不具可读性。所以如果想看到原邮件,可以采取如下方式
/**
* Created by Daniel Chiu on 2015/2/9.
*/
public class Decode
{
public static void main (String[] args) throws IOException
{
String s = "";//s里面粘贴上面的一系列base64数据
BASE64Decoder decoder = new BASE64Decoder ();
//将已经转换成base64的字符串解码 转换成完全的二进制数据
byte[] bytes = decoder.decodeBuffer ( s );
//采用String的构造方法将此二进制数据再次转换成utf-8的编码
//需要注意的是 虽然现在二进制文件 但是重新反编码的话不能随便更改编码 比如GBK就不行
String s2 = new String ( bytes, "utf-8" );
System.out.println ( s2 );
}
}