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

📄 cmppconnectrep.java

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

public class CmppConnectRep
{

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

    status = -1;
    version = -1;
    AuthenticatorISMG = "";

    bodybytes = new byte[bodylens];

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

  }

  public int getStatus()
  {
    byte tmp = bodybytes[0];
    status = (int) tmp;
    return status;
  }

  public int getVersion()
  {
    byte tmp = bodybytes[17];
    version = (int) tmp;
    return version;
  }

  public String getAuthenticatorISMG()
  {
    StringBuffer sb = new StringBuffer();
    int i = 1;
    for (i = 1; i < 17; i++)
    {
      char chr = (char) bodybytes[i];
      sb.append(chr);
    }

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

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

  int status; //0:正确1:消息结构错 2:非法SP_ID 3:SP认证错 4:版本太高  5~ :其他错误
  String AuthenticatorISMG;
  int version;
}

⌨️ 快捷键说明

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