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

📄 cbsquery.java

📁 WAP服务器
💻 JAVA
字号:
package simulator.wap.message;

import net.smpp.message.SMPPRequest;
import net.smpp.message.SMPPProtocolException;
import net.smpp.util.SMPPIO;

import java.io.OutputStream;

/**
 *
 * Author: zhouzh
 * Create Time: 2004-7-28 0:55:38
 *
 */
public class CBSQuery extends SMPPRequest
{
    public CBSQuery()
    {
        super(CBS_QUERY);
    }

    public CBSQuery(int seqNum)
    {
        super(CBS_QUERY_RESP, seqNum);
    }

    String payMsisdn;


    public int getBodyLength()
    {
        int len = ((payMsisdn != null) ? payMsisdn.length() + 1 : 1);
        return len;
    }

    protected void encodeBody(OutputStream out) throws java.io.IOException
    {
        SMPPIO.writeCString(payMsisdn, out);
    }

    public void readBodyFrom(byte[] body, int offset) throws SMPPProtocolException
    {
        payMsisdn = SMPPIO.readCString(body, offset);
        offset += payMsisdn.length() + 1;
    }

    public String getPayMsisdn()
    {
        return payMsisdn;
    }

    public void setPayMsisdn(String payMsisdn)
    {
        this.payMsisdn = payMsisdn;
    }

}

⌨️ 快捷键说明

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