📄 smiltest.java
字号:
// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi
// Source File Name: SmilTest.java
package com.huawei.mms.demo;
import com.huawei.mms.pdu.MMSContent;
import com.huawei.mms.pdu.MMessage;
import com.huawei.mms.vas.MMSender;
import com.huawei.mms.vas.VAS;
import java.io.*;
public class SmilTest
{
public SmilTest()
{
}
public static void main(String args[])
{
MMSender s = new MMSender();
VAS.VASP_ID = "777703";
VAS.VAS_ID = "1003";
VAS.Service_Code = "103";
VAS.VAS_USER = "test";
VAS.VAS_PASSWORD = "test";
VAS.MMSC_URL = "http://211.136.90.150/vas";
VAS.From = "13600000022/TYPE=PLMN";
VAS.To = "13699000002/TYPE=PLMN;13699000001/TYPE=PLMN";
MMessage m = new MMessage();
m.setSubject("汉字iiiii");
m.setContentType("application/vnd.wap.multipart.related");
m.setPresentationId("smil1.smil");
MMSContent mmc = new MMSContent();
byte content[] = null;
try
{
content = readFromFile("E:\\f.smil");
}
catch(IOException e)
{
content = new byte[0];
e.printStackTrace();
}
mmc.setContent(content, 0, content.length);
mmc.setType("application/smil");
mmc.setContentId("smil1.smil");
m.addContent(mmc);
try
{
content = readFromFile("E:\\f.gif");
System.out.println(" ".concat(String.valueOf(String.valueOf(content.length))));
}
catch(IOException e)
{
content = new byte[0];
e.printStackTrace();
}
mmc.setContent(content, 0, content.length);
mmc.setType("image/gif");
mmc.setContentId("f.gif");
mmc.setContentLocation("f.gif");
m.addContent(mmc);
s.send(m);
}
public static byte[] readFromFile(String file_name)
throws IOException
{
FileInputStream fin = new FileInputStream(file_name);
byte buf[] = new byte[fin.available()];
fin.read(buf);
fin.close();
return buf;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -