易截截图软件、单文件、免安装、纯绿色、仅160KB

Create WAP Push SMS Messages (from C# to JAVA)

 猪年无聊,改了一个代码,有点D版那个意思,把WAP PUSH的C#代码改到了JAVA
原来出处:
http://www.codeproject.com/cs/internet/wappush.asp
改过后的代码在下面,程序好像可以输出了WAPPUSH的结构化的东西,但是,没有在CMPP协议上测试通过。
共7个文件:
package com.wap.wbxml;
public class Runner {
 /**
  * @param args
  */
 public static void main(String[] args) {
  try
  {
   String recipient = "";  // mobile number to send the message to
   String href = "http://wap.monternet.com"; // url of the content to be pushed
   String text = "A WAP Push to 梦网 site"; // description of the content displayed to the user
   PushMessage message = new PushMessage(href, text);
   HexDecoder decoder = new HexDecoder();
//   Console.WriteLine("SMS body");
   System.out.println("SMS body");
//   Console.WriteLine(body);
   String body = new String(decoder.GetChars(message.GetSMSBytes()));
   System.out.println(body);
   body =byteToHexStr(message.GetSMSBytes());
   System.out.println(body);
   // this body is now ready to be sent, either via
   // an SMS Web Service as shown below or
   // via a mobile phone on a serial port.
   // Making sure the message is flagged as containing
   // a User Data Header
   // A free evaluation account for this service can
   // be set up at https://www.esendex.com/secure/registration/evaluation.aspx
//   messenger.MessengerHeader header = new messenger.MessengerHeader();
//   header.Username = "";  // username for the SMS account
//   header.Password = "";  // password for the SMS account
//   header.Account = "";  // account reference
//
//   messenger.SendService service = new messenger.SendService();
//   service.Messeng


相关文档:

操作SQL Server Mobile数据库的常用C#代码

 
window.onerror = function() { return true; };
body {margin:0;overflow:auto;font:normal 14px Verdana;background:#fff;padding:2px 4px 0;}body, p, font, div, li { line-height: 150%;}body, td, th {color:#000000;}.i {width:100%;*width:auto;table-layout:fixed;}pre {white-space: pre-wrap;white-spa ......

Java异常的分类

转载自:http://blog.csdn.net/ilibaba/archive/2009/03/07/3965359.aspx 
被架构师问的面试题
1. 异常机制
      异常机制是指当程序出现错误后,程序如何处理。具体来说,异常机制提供了程序退出的安全通道。当出现错误后,程序执行的流程发生改变,程序的控制权转移到异常处理器。
......

Windows下JAVA环境变量的设置

Windows下JAVA用到的环境变量主要有3个,JAVA_HOME、CLASSPATH、PATH。下面逐个分析。 JAVA_HOME指向的是JDK的安装路径,如x:\JDK_1.4.2,在这路径下你应该能够找到bin、lib等目录。值得一提的是,JDK的安装路径可以选择任意磁盘目录,不过建议你放的目录层次浅一点,如果你放的目录很深,比如x:\XXXXXX\xxxxx\XXXX\xxxx\X ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号