📄 cbsunpay.java
字号:
package simulator.wap.message;
import net.smpp.message.SMPPRequest;
import net.smpp.message.SMPPProtocolException;
import net.smpp.util.SMPPIO;
import java.io.OutputStream;
public class CBSUnpay extends SMPPRequest
{
public CBSUnpay()
{
super(CBS_UNPAY) ;
}
public CBSUnpay(int seqNum)
{
super(CBS_UNPAY, seqNum);
}
String orgSn;
int result;
public int getBodyLength()
{
int len = ((orgSn != null) ? orgSn.length()+1 : 1) + 1;
return len;
}
protected void encodeBody(OutputStream out) throws java.io.IOException
{
SMPPIO.writeCString(orgSn, out);
SMPPIO.writeInt(result, 1, out);
}
public void readBodyFrom(byte[] body, int offset) throws SMPPProtocolException
{
orgSn = SMPPIO.readCString(body, offset);
offset += orgSn.length()+1;
result = SMPPIO.bytesToInt(body, 1, offset);
offset+=1;
}
public String getOrgSn()
{
return orgSn;
}
public void setOrgSn(String orgSn)
{
this.orgSn = orgSn;
}
public int getResult()
{
return result;
}
public void setResult(int result)
{
this.result = result;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -