public CMPPDeliverRepMessage(byte msg_Id[], int result) throws IllegalArgumentException { if (msg_Id.length > 8) throw new IllegalArgumentException( String.valueOf( String.valueOf( (new StringBuffer( String.valueOf(String.valueOf(CMPPConstant.DELIVER_REPINPUT_ERROR)))) .append(":msg_Id") .append(CMPPConstant.STRING_LENGTH_GREAT) .append("8")))); if (result < 0 || result > 255) { throw new IllegalArgumentException( String.valueOf( String.valueOf( (new StringBuffer( String.valueOf(String.valueOf(CMPPConstant.DELIVER_REPINPUT_ERROR)))) .append(":result") .append(CMPPConstant.INT_SCOPE_ERROR)))); } else { int len = 21; buf = new byte[len]; TypeConvert.int2byte(len, buf, 0); TypeConvert.int2byte(0x80000005, buf, 4); System.arraycopy(msg_Id, 0, buf, 12, msg_Id.length); buf[20] = (byte) result; outStr = ",result=".concat(String.valueOf(String.valueOf(result))); return; } }
public SGIPUserReportMessage(byte buf[]) throws IllegalArgumentException { super.buf = new byte[63]; if (buf.length != 63) { throw new IllegalArgumentException(SGIPConstant.SMC_MESSAGE_ERROR); } else { System.arraycopy(buf, 0, super.buf, 0, 63); super.src_node_Id = TypeConvert.byte2int(super.buf, 0); super.time_Stamp = TypeConvert.byte2int(super.buf, 4); super.sequence_Id = TypeConvert.byte2int(super.buf, 8); } }
public SGIPDeliverMessage(byte buf[]) throws IllegalArgumentException { int len = TypeConvert.byte2int(buf, 57); len = 69 + len; if (buf.length != len) { throw new IllegalArgumentException(SGIPConstant.SMC_MESSAGE_ERROR); } else { super.buf = new byte[len]; System.arraycopy(buf, 0, super.buf, 0, buf.length); super.src_node_Id = TypeConvert.byte2int(super.buf, 0); super.time_Stamp = TypeConvert.byte2int(super.buf, 4); super.sequence_Id = TypeConvert.byte2int(super.buf, 8); return; } }
public int getMsgLength() { return TypeConvert.byte2int(super.buf, 57); }