?? mmssendmsgmain.java
字號:
package com.hxyh.sanny.mms.telecom.main;
import java.io.File;
import java.io.IOException;
import java.util.List;
import javax.activation.DataHandler;
import javax.activation.DataSource;
import javax.activation.FileDataSource;
import org.apache.axiom.attachments.Attachments;
import com.hxyh.sanny.mms.telecom.service.SendMessageServiceStub.SendMessage;
public class MMSSendMsgMain {
public static void main(String[] args) {
MMSDobussi ob = new MMSDobussi();
ob.initParam();
// MMSDobussi ob = new MMSDobussi();
// 設(shè)置彩信附件, 從磁盤讀取圖片文件
// File f = new File("D:\\1.jpg");
// Attachments attachments = new Attachments();
// FileDataSource ds = new FileDataSource(f);
// DataHandler dh = new DataHandler(ds);
// attachments.addDataHandler("1.gif", dh);
// Attachments attachments = ob.MakeMMS();
// File subf = new File("D:\\1.txt");
// FileDataSource subds = new FileDataSource(subf);
// DataHandler subdh = new DataHandler(subds);
// attachments.addDataHandler("1.txt",subdh);
// String substr = new String("123456789");
// DataHandler subdh = new DataHandler(substr,"text/plain");
// attachments.addDataHandler("1.txt",subdh);
// DataSource subds = null;
//
// DataHandler dh2 = null;
// String[] str = attachments.getAllContentIDs();
// for(int i = 0; i< str.length;i++){
// System.out.println("str["+i+"]is:"+str[i]);
// dh2 = attachments.getDataHandler(str[i]);
// System.out.println(dh2.getContentType());
// try {
// System.out.println(dh2.getContent().toString());
// } catch (IOException e) {
// // TODO Auto-generated catch block
// e.printStackTrace();
// }
// }
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -