tp_udh_ei_sar.java

来自「试用JAVA通过COMM口发送短信的代码.」· Java 代码 · 共 55 行

JAVA
55
字号
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   TP_UDH_EI_Sar.java

package org.cross.sms.msg;


// Referenced classes of package org.cross.sms.msg:
//            TP_Element_Inter, _CharacterUtil

public class TP_UDH_EI_Sar
    implements TP_Element_Inter
{

    public TP_UDH_EI_Sar()
    {
        m_pdu = "0003000101";
    }

    public String getPdu()
    {
        return m_pdu;
    }

    public int getTotalLength()
    {
        return 10;
    }

    public void readPdu(String Pdu)
    {
        m_pdu = Pdu.substring(0, 10);
        max = Integer.parseInt(m_pdu.substring(6, 8), 16);
        no = Integer.parseInt(m_pdu.substring(8, 10), 16);
        refno = Integer.parseInt(m_pdu.substring(4, 6), 16);
    }

    public void set(int max, int no, int refno)
    {
        this.max = max;
        this.no = no;
        this.refno = refno;
        m_pdu = "0003";
        m_pdu = m_pdu + _CharacterUtil.intToHexString(refno);
        m_pdu = m_pdu + _CharacterUtil.intToHexString(max);
        m_pdu = m_pdu + _CharacterUtil.intToHexString(no);
    }

    String m_pdu;
    int max;
    int no;
    int refno;
}

⌨️ 快捷键说明

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