re: 對國內翻譯的Java書籍的一些看法 純凈水 2006-07-09 22:37
絕對同意你的看法,,就好象我剛剛學習struts的時象,想找本中文的書看看,,難難難,,,中文資料都難找,可我的是英文極道有限公司呢。。。。現在的JAVA書的確翻譯得不怎么樣,,我看過最好的一本是with out ejb,其它的都一般般,特別是什么冶X出版社的,我發誓不買他的書的了。
messageBodyPart = new MimeBodyPart();
DataSource source = new ByteArrayDataSource(bytes[],contentType);
// Set the data handler to the attachment
messageBodyPart.setDataHandler(new DataHandler(source));
// Set the filename
BASE64Encoder enc = new BASE64Encoder();
String fileName="哈哈哈.txt";
//文件名用base64一下,解決中文問題
messageBodyPart.setFileName("=?utf-8?B?"+ enc.encode(fileName.getBytes("utf-8")) + "?=");
//protected Multipart multipart = new MimeMultipart("related");
multipart.addBodyPart(messageBodyPart);
//最后用mailMessage.setContent(multipart);
//這樣就OK了,寫得亂了一點,,Momail就是用javamail來實現的了,有興趣的可以到momail.moabc.com去看看