cmppactivemessage.java
来自「移动CMPP的网关,JAVA又一实现,非常完整的代码.」· Java 代码 · 共 56 行
JAVA
56 行
/*
* Created on Mar 17, 2005
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/
package com.grail.comm.cmpp.message;
import com.grail.comm.cmpp.CMPPConstant;
import com.grail.util.TypeConvert;
/**
* @author eclipse
*
* TODO To change the template for this generated type comment go to
* Window - Preferences - Java - Code Style - Code Templates
*/
public class CMPPActiveMessage extends CMPPMessage
{
public CMPPActiveMessage()
{
int len = 12;
buf = new byte[len];
TypeConvert.int2byte(len, buf, 0);
TypeConvert.int2byte(8, buf, 4);
}
public CMPPActiveMessage(byte buf[])
throws IllegalArgumentException
{
super.buf = new byte[4];
if(buf.length != 4)
{
throw new IllegalArgumentException(CMPPConstant.SMC_MESSAGE_ERROR);
} else
{
System.arraycopy(buf, 0, super.buf, 0, 4);
sequence_Id = TypeConvert.byte2int(super.buf, 0);
return;
}
}
public String toString()
{
String tmpStr = "CMPP_Active_Test: ";
tmpStr = String.valueOf(String.valueOf((new StringBuffer(String.valueOf(String.valueOf(tmpStr)))).append("Sequence_Id=").append(getSequenceId())));
return tmpStr;
}
public int getCommandId()
{
return 8;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?