📄 cmppconnectrep.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 + -