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

📄 smsmsgin.java

📁 试用JAVA通过COMM口发送短信的代码.
💻 JAVA
字号:
// 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:   SMSMsgIn.java

package org.cross.sms.msg;

import java.util.Date;

// Referenced classes of package org.cross.sms.msg:
//            SMSMsg, TP_Address_SMSC, TP_Address_Da_Oa, TP_Dsc_CharSet, 
//            TP_Scts_time, _CharacterUtil

public class SMSMsgIn extends SMSMsg
{

    public SMSMsgIn(Date date, String originator, String text, int memIndex)
    {
        super(1, date, originator, null, text, memIndex);
        m_pdu = "";
    }

    public SMSMsgIn(int messageType, int memIndex)
    {
        super(messageType, null, null, null, null, memIndex);
        m_pdu = "";
    }

    public SMSMsgIn(String pdu, int memIndex)
    {
        super(1, null, null, null, null, memIndex);
        m_pdu = "";
        m_pdu = pdu;
        TP_Address_SMSC smsc = new TP_Address_SMSC();
        smsc.readPdu(pdu);
        int index = smsc.getTotalLength();
        index += 2;
        TP_Address_Da_Oa oa = new TP_Address_Da_Oa();
        oa.readPdu(pdu.substring(index));
        index += oa.getTotalLength();
        originator = oa.m_code;
        index += 2;
        TP_Dsc_CharSet encoding = new TP_Dsc_CharSet();
        encoding.readPdu(pdu.substring(index));
        index += encoding.getTotalLength();
        TP_Scts_time t = new TP_Scts_time();
        t.readPdu(pdu.substring(index));
        index += t.getTotalLength();
        date = t.getDate();
        text = _CharacterUtil.hexToString(pdu.substring(index + 2), encoding.getMessageEncoding());
    }

    public String getPdu()
    {
        return m_pdu;
    }

    public static final int CLASS_ALL = 0;
    public static final int CLASS_REC_UNREAD = 1;
    public static final int CLASS_REC_READ = 2;
    public static final int CLASS_STO_UNSENT = 3;
    public static final int CLASS_STO_SENT = 4;
    private String m_pdu;
}

⌨️ 快捷键说明

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