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

📄 cmppqueryrep.java

📁 短信系统SMS:支持普通短信、长短信和wap push短信的发送。
💻 JAVA
字号:
package com.ekun.sms.cmpp2;

public class CmppQueryRep
{

  public CmppQueryRep(byte bodys[], int bodylens)
  {
    this.bodylens = bodylens;
    bodybytes = new byte[bodylens];

    gTime = "";
    QueryType = 0;
    QueryCode = "";
    MTTLMsg = 0;
    MTTlusr = 0;
    MTScs = 0;
    MTWT = 0;
    MTFL = 0;
    MOScs = 0;
    MOWT = 0;
    MOFL = 0;

    bodybytes = new byte[bodylens];

    int i = 0;
    for (i = 0; i < bodylens; i++)
    {
      bodybytes[i] = bodys[i];
    }

  }

  public String getTime()
  {
    StringBuffer sb = new StringBuffer();
    int i = 0;
    for (i = 0; i < 8; i++)
    {
      char chr = (char) bodybytes[i];
      sb.append(chr);
    }

    gTime = sb.toString();
    return gTime;
  }

  public int getQueryType()
  {
    byte tmp = bodybytes[8];
    QueryType = (int) tmp;
    return QueryType;
  }

  public String getQueryCode()
  {
    StringBuffer sb = new StringBuffer();
    int i = 9;
    for (i = 9; i < 19; i++)
    {
      char chr = (char) bodybytes[i];
      sb.append(chr);
    }

    QueryCode = sb.toString();
    return QueryCode;
  }

  public int getMTTLMsg()
  {
    byte tmp[] = new byte[4];

    CmppCommon.BytesCopy(bodybytes, tmp, 19, 22, 0);
    MTTLMsg = CmppCommon.Bytes4ToInt(tmp);
    return MTTLMsg;
  }

  public int getMTTlusr()
  {
    byte tmp[] = new byte[4];
    CmppCommon.BytesCopy(bodybytes, tmp, 23, 26, 0);

    MTTlusr = CmppCommon.Bytes4ToInt(tmp);
    return MTTlusr;
  }

  public int getMTScs()
  {
    byte tmp[] = new byte[4];
    CmppCommon.BytesCopy(bodybytes, tmp, 27, 30, 0);

    MTScs = CmppCommon.Bytes4ToInt(tmp);
    return MTScs;
  }

  public int getMTWT()
  {
    byte tmp[] = new byte[4];
    CmppCommon.BytesCopy(bodybytes, tmp, 31, 34, 0);

    MTWT = CmppCommon.Bytes4ToInt(tmp);
    return MTWT;
  }

  public int getMTFL()
  {
    byte tmp[] = new byte[4];
    CmppCommon.BytesCopy(bodybytes, tmp, 35, 38, 0);

    MTFL = CmppCommon.Bytes4ToInt(tmp);
    return MTFL;
  }

  public int getMOScs()
  {
    byte tmp[] = new byte[4];
    CmppCommon.BytesCopy(bodybytes, tmp, 39, 42, 0);

    MOScs = CmppCommon.Bytes4ToInt(tmp);
    return MOScs;
  }

  public int getMOWT()
  {
    byte tmp[] = new byte[4];
    CmppCommon.BytesCopy(bodybytes, tmp, 43, 46, 0);

    MOWT = CmppCommon.Bytes4ToInt(tmp);
    return MOWT;
  }

  public int getMOFL()
  {
    byte tmp[] = new byte[4];
    CmppCommon.BytesCopy(bodybytes, tmp, 47, 50, 0);

    MOFL = CmppCommon.Bytes4ToInt(tmp);
    return MOFL;
  }

  byte bodybytes[]; /*包体*/
  int bodylens;

  String gTime;
  int QueryType;
  String QueryCode;
  int MTTLMsg;
  int MTTlusr;
  int MTScs;
  int MTWT;
  int MTFL;
  int MOScs;
  int MOWT;
  int MOFL;
}

⌨️ 快捷键说明

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