📄 cbsunpayresp.java
字号:
package simulator.wap.message;
import net.smpp.message.SMPPResponse;
import net.smpp.message.SMPPProtocolException;
import net.smpp.util.SMPPIO;
import java.io.OutputStream;
/**
*
* Author: zhouzh
* Create Time: 2004-7-28 1:12:37
*
*/
public class CBSUnpayResp extends SMPPResponse
{
public CBSUnpayResp()
{
super(CBS_UNPAY_RESP);
}
public CBSUnpayResp(int seqNum)
{
super(CBS_UNPAY_RESP, seqNum);
}
int result;
int balance;
public CBSUnpayResp(CBSUnpay r)
{
super(r);
}
public int getBodyLength()
{
return 5;
}
protected void encodeBody(OutputStream out)
throws java.io.IOException
{
SMPPIO.writeInt(result, 1, out);
SMPPIO.writeInt(balance, 4, out);
}
public void readBodyFrom(byte[] b, int offset) throws SMPPProtocolException
{
result = SMPPIO.bytesToInt(b, offset, 1);
offset += 1;
balance = SMPPIO.bytesToInt(b, offset, 4);
offset += 4;
}
public static final int OP_SUCCESS = 0;
public static final int OP_ERR_NOEXIST =5;
public static final int OP_ERR_OTHER = 99;
public int getResult()
{
return result;
}
public void setResult(int result)
{
this.result = result;
}
public int getBalance()
{
return balance;
}
public void setBalance(int balance)
{
this.balance = balance;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -