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

📄 cmppquery.java

📁 联通短信平台
💻 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:   cmppQuery.java

package com.aspire.cmppApi;

import java.io.*;

// Referenced classes of package com.aspire.cmppApi:
//            cmppCommon, cmppSocket

public class cmppQuery
{

    public byte bodybytes[];
    public byte headbytes[];
    String curTime;
    int QueryType;
    String QueryCode;
    String Reserve;
    private int CommandID;
    private int SequenceId;
    int TotalLength;
    cmppSocket conn;

    public cmppQuery(cmppSocket cmppsocket)
    {
        curTime = "";
        QueryType = 0;
        QueryCode = "";
        Reserve = "Reserve";
        conn = cmppsocket;
        SequenceId = 0;
        CommandID = 6;
        TotalLength = 39;
        bodybytes = new byte[27];
        headbytes = new byte[12];
        cmppCommon.BytesCopy(cmppCommon.IntToBytes4(TotalLength), headbytes, 0, 3, 0);
        cmppCommon.BytesCopy(cmppCommon.IntToBytes4(CommandID), headbytes, 0, 3, 4);
        cmppCommon.BytesCopy(cmppCommon.IntToBytes4(SequenceId), headbytes, 0, 3, 8);
    }

    public int getTotalLength()
    {
        return TotalLength;
    }

    public int sendcmppQuery()
    {
        int i = 0;
        synchronized(conn)
        {
            try
            {
                conn.bout.write(headbytes);
                conn.bout.write(bodybytes);
                conn.bout.flush();
            }
            catch(IOException ioexception)
            {
                System.out.println(ioexception.toString());
                i = -5;
                int j = i;
                return j;
            }
        }
        return i;
    }

    public void setSequenceId(int i)
    {
        SequenceId = i;
        cmppCommon.BytesCopy(cmppCommon.IntToBytes4(i), headbytes, 0, 3, 8);
    }

    public void setcmppQuerys(String s, int i, String s1, String s2)
    {
        int j = 0;
        byte abyte0[] = new byte[8];
        abyte0 = s.getBytes();
        cmppCommon.BytesCopy(abyte0, bodybytes, 0, abyte0.length - 1, j);
        j += 8;
        bodybytes[j] = (byte)i;
        j++;
        byte abyte1[] = new byte[10];
        abyte1 = s1.getBytes();
        cmppCommon.BytesCopy(abyte1, bodybytes, 0, abyte1.length - 1, j);
        j += 10;
        byte abyte2[] = new byte[8];
        abyte2 = s2.getBytes();
        cmppCommon.BytesCopy(abyte2, bodybytes, 0, abyte2.length - 1, j);
    }
}

⌨️ 快捷键说明

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