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

📄 msghead.java

📁 短信平台CMPP30 的JAVA程序,(含SQL数据库)
💻 JAVA
字号:
// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi 
// Source File Name:   MsgHead.java

package com.SGIP12.sgipdata;

import java.io.*;

// Referenced classes of package com.SGIP12.sgipdata:
//            SGIP_Command

public class MsgHead
{

    private int CommandID;
    public byte Head[];
    private long Seq_1;
    private int Seq_2;
    private int Seq_3;
    private int TotalLength;
    private byte tempbytes[];

    public MsgHead(int totalLength, int commandID, long seq_1, int seq_2, int seq_3)
    {
        boolean flag = false;
        Head = new byte[20];
        TotalLength = totalLength;
        CommandID = commandID;
        Seq_1 = seq_1;
        Seq_2 = seq_2;
        Seq_3 = seq_3;
        SGIP_Command.BytesCopy(SGIP_Command.IntToBytes4(totalLength), Head, 0, 3, 0);
        SGIP_Command.BytesCopy(SGIP_Command.IntToBytes4(commandID), Head, 0, 3, 4);
        SGIP_Command.BytesCopy(SGIP_Command.LongToBytes4(seq_1), Head, 0, 3, 8);
        SGIP_Command.BytesCopy(SGIP_Command.IntToBytes4(seq_2), Head, 0, 3, 12);
        SGIP_Command.BytesCopy(SGIP_Command.IntToBytes4(seq_3), Head, 0, 3, 16);
    }

    public MsgHead()
    {
        Head = new byte[20];
    }

    public MsgHead(byte abyte0[])
    {
        boolean flag = false;
        Head = new byte[20];
        for(int i = 0; i < 20; i++)
            Head[i] = abyte0[i];

        TotalLength = SGIP_Command.Bytes4ToInt(Head);
        tempbytes = (new byte[] {
            Head[4], Head[5], Head[6], Head[7]
        });
        CommandID = SGIP_Command.Bytes4ToInt(tempbytes);
        tempbytes = (new byte[] {
            Head[8], Head[9], Head[10], Head[11]
        });
        Seq_1 = SGIP_Command.Bytes4ToLong(tempbytes);
        tempbytes = (new byte[] {
            Head[12], Head[13], Head[14], Head[15]
        });
        Seq_2 = SGIP_Command.Bytes4ToInt(tempbytes);
        tempbytes = (new byte[] {
            Head[16], Head[17], Head[18], Head[19]
        });
        Seq_3 = SGIP_Command.Bytes4ToInt(tempbytes);
    }

    public int getCommandID()
    {
        return CommandID;
    }

    public long getSeq_1()
    {
        return Seq_1;
    }

    public int getSeq_2()
    {
        return Seq_2;
    }

    public int getSeq_3()
    {
        return Seq_3;
    }

    public int getTotalLength()
    {
        return TotalLength;
    }

    public int read(InputStream inputstream)
    {
        byte abyte0[] = new byte[4];
        inputstream.read(abyte0);
        SGIP_Command.BytesCopy(abyte0, Head, 0, 3, 0);
        TotalLength = SGIP_Command.Bytes4ToInt(abyte0);
        inputstream.read(abyte0);
        SGIP_Command.BytesCopy(abyte0, Head, 0, 3, 4);
        CommandID = SGIP_Command.Bytes4ToInt(abyte0);
        inputstream.read(abyte0);
        SGIP_Command.BytesCopy(abyte0, Head, 0, 3, 8);
        Seq_1 = SGIP_Command.Bytes4ToLong(abyte0);
        inputstream.read(abyte0);
        SGIP_Command.BytesCopy(abyte0, Head, 0, 3, 12);
        Seq_2 = SGIP_Command.Bytes4ToInt(abyte0);
        inputstream.read(abyte0);
        SGIP_Command.BytesCopy(abyte0, Head, 0, 3, 16);
        Seq_3 = SGIP_Command.Bytes4ToInt(abyte0);
        break MISSING_BLOCK_LABEL_149;
        Exception exception;
        exception;
        System.out.println(exception.toString());
        return -1;
        return 0;
    }

    public void setCommandID(int cmdID)
    {
        CommandID = cmdID;
        SGIP_Command.BytesCopy(SGIP_Command.IntToBytes4(cmdID), Head, 0, 3, 4);
    }

    public void setSeq_1(long seq_1)
    {
        Seq_1 = seq_1;
        SGIP_Command.BytesCopy(SGIP_Command.LongToBytes4(seq_1), Head, 0, 3, 8);
    }

    public void setSeq_2(int seq_2)
    {
        Seq_2 = seq_2;
        SGIP_Command.BytesCopy(SGIP_Command.IntToBytes4(seq_2), Head, 0, 3, 12);
    }

    public void setSeq_3(int seq_3)
    {
        Seq_3 = seq_3;
        SGIP_Command.BytesCopy(SGIP_Command.IntToBytes4(seq_3), Head, 0, 3, 16);
    }

    public void setTotalLength(int totalLen)
    {
        TotalLength = totalLen;
        SGIP_Command.BytesCopy(SGIP_Command.IntToBytes4(totalLen), Head, 0, 3, 0);
    }

    public int write(OutputStream outputstream)
    {
        boolean flag = false;
        outputstream.write(Head);
        break MISSING_BLOCK_LABEL_27;
        Exception exception;
        exception;
        System.out.println(exception.toString());
        return -1;
        return 0;
    }
}

⌨️ 快捷键说明

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