⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 deliverresponse.java

📁 采用JAVA开发
💻 JAVA
字号:
package com.gctech.cmpp3.msg;

import com.gctech.util.Tools;

/**
 * <p>Title: 短信 API</p>
 * <p>Description: 短信SP API</p>
 * <p>Copyright: Copyright (c) 2004</p>
 * <p>Company: GCTECH</p>
 * @author 王红宝
 * @version $Id: DeliverResponse.java,v 1.2 2004/05/24 01:09:41 wanghb Exp $
 */

public class DeliverResponse extends CmppMsg{

  //add by liya begin
  private byte[] result = Tools.IntToBytes4(0);
  private byte[] msgId;
  public void setMsgId(byte[] msgId){
    this.msgId = msgId;
  }
  public byte[] getResult()
  {
    return result;
  }

  public int readbody()
  {
    //result = bodybytes[8];
	System.arraycopy(result, 0, bodybytes, 8, 4);
    return 0;
  }

  public DeliverResponse(CmppMsg cmppmsg) {
    super(cmppmsg);
  }

  public String toString() {
    return "MsgID:"+""+" Result:"+result;
  }
  //add by liya end

  public DeliverResponse() {
    super();
    this.head.setCommandId(CommandID.CMPP_DELIVER_RESP);
    this.head.setTotalLength(24);
  }

  protected void toByteArray(byte[] data) {
    System.arraycopy(msgId, 0, data, 12, 8);
	System.arraycopy(result, 0, data, 20, 4);
  }

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -