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

📄 smppsubmitrespmessage.java

📁 华为CNGP.CMPP.SGIP.CMPP源代码。
💻 JAVA
字号:
package com.huawei.insa2.comm.smpp.message;

import com.huawei.insa2.comm.smpp.SMPPConstant;

public class SMPPSubmitRespMessage extends SMPPMessage {

	public SMPPSubmitRespMessage(byte buf[]) throws IllegalArgumentException {
		super.buf = new byte[25];
		if (buf.length < 17 || buf.length > 25) {
			throw new IllegalArgumentException(SMPPConstant.SMC_MESSAGE_ERROR);
		} else {
			System.arraycopy(buf, 0, super.buf, 0, buf.length);
			return;
		}
	}

	public String getMessageId() {
		return getFirstStr(super.buf, 16);
	}

	private String getFirstStr(byte buf[], int sPos) {
		int deli = 0;
		byte tmpBuf[] = new byte[21];
		int pos;
		for (pos = sPos; buf[pos] != 0 && pos < buf.length; pos++)
			tmpBuf[pos - sPos] = buf[pos];

		if (pos == sPos) {
			return "";
		} else {
			String tmpStr = new String(tmpBuf);
			return tmpStr.substring(0, pos - sPos);
		}
	}

	public String toString() {
		StringBuffer strBuf = new StringBuffer(200);
		strBuf.append("SMPPSubmitRespMessage: ");
		strBuf.append("PacketLength=".concat(String.valueOf(String
				.valueOf(getMsgLength()))));
		strBuf.append(",CommandID=".concat(String.valueOf(String
				.valueOf(getCommandId()))));
		strBuf.append(",Status=".concat(String.valueOf(String
				.valueOf(getStatus()))));
		strBuf.append(",SequenceId=".concat(String.valueOf(String
				.valueOf(getSequenceId()))));
		strBuf.append(",MessageId=".concat(String.valueOf(String
				.valueOf(new String(getMessageId())))));
		return strBuf.toString();
	}
}

⌨️ 快捷键说明

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