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

📄 cmppcommon.java

📁 移动短信网关接口源程序框架
💻 JAVA
字号:
// Decompiled by DJ v2.9.9.60 Copyright 2000 Atanas Neshkov  Date: 2004-4-16 11:12:20
// Home Page : http://members.fortunecity.com/neshkov/dj.html  - Check often for new version!
// Decompiler options: packimports(3) 
// Source File Name:   cmppCommon.java

package com.aspire.cmppApi;

import java.io.PrintStream;

public class cmppCommon
{

    public cmppCommon()
    {
    }

    public static int ByteToInt(byte byte0)
    {
        return byte0;
    }

    public static int Bytes4ToInt(byte abyte0[])
    {
        int i = (0xff & abyte0[0]) << 24 | (0xff & abyte0[1]) << 16 | (0xff & abyte0[2]) << 8 | 0xff & abyte0[3];
        return i;
    }

    public static long Bytes8ToLong(byte abyte0[])
    {
        long l = (0xff & abyte0[0]) << 56 | (0xff & abyte0[1]) << 48 | (0xff & abyte0[2]) << 40 | (0xff & abyte0[3]) << 32 | (0xff & abyte0[4]) << 24 | (0xff & abyte0[5]) << 16 | (0xff & abyte0[6]) << 8 | 0xff & abyte0[7];
        return l;
    }

    public static void BytesCopy(byte abyte0[], byte abyte1[], int i, int j, int k)
    {
        int l = 0;
        for(int i1 = i; i1 <= j; i1++)
        {
            abyte1[k + l] = abyte0[i1];
            l++;
        }

    }

    public static int BytesToInt(byte abyte0[])
    {
        int i = (0xff & abyte0[0]) << 24 | (0xff & abyte0[1]) << 16 | (0xff & abyte0[2]) << 8 | abyte0[3];
        return i;
    }

    public static byte IntToByte(int i)
    {
        return (byte)i;
    }

    public static byte[] IntToBytes(int i)
    {
        byte abyte0[] = new byte[2];
        abyte0[1] = (byte)(0xff & i);
        abyte0[0] = (byte)((0xff00 & i) >> 8);
        return abyte0;
    }

    public static void IntToBytes(int i, byte abyte0[])
    {
        abyte0[1] = (byte)(0xff & i);
        abyte0[0] = (byte)((0xff00 & i) >> 8);
    }

    public static byte[] IntToBytes4(int i)
    {
        byte abyte0[] = new byte[4];
        abyte0[3] = (byte)(0xff & i);
        abyte0[2] = (byte)((0xff00 & i) >> 8);
        abyte0[1] = (byte)((0xff0000 & i) >> 16);
        abyte0[0] = (byte)((0xff000000 & i) >> 24);
        return abyte0;
    }

    public static void IntToBytes4(int i, byte abyte0[])
    {
        abyte0[3] = (byte)(0xff & i);
        abyte0[2] = (byte)((0xff00 & i) >> 8);
        abyte0[1] = (byte)((0xff0000 & i) >> 16);
        abyte0[0] = (byte)((0xff000000 & i) >> 24);
    }

    public static byte[] LongToBytes8(long l)
    {
        byte abyte0[] = new byte[8];
        abyte0[7] = (byte)(int)(255L & l);
        abyte0[6] = (byte)(int)((65280L & l) >> 8);
        abyte0[5] = (byte)(int)((0xff0000L & l) >> 16);
        abyte0[4] = (byte)(int)((0xffffffffff000000L & l) >> 24);
        int i = (int)(l >> 32);
        abyte0[3] = (byte)(0xff & i);
        abyte0[2] = (byte)((0xff00 & i) >> 8);
        abyte0[1] = (byte)((0xff0000 & i) >> 16);
        abyte0[0] = (byte)((0xff000000 & i) >> 24);
        return abyte0;
    }

    public static void printBytes(byte abyte0[], int i)
    {
        int k = 0;
        for(int j = 0; j < i; j++)
        {
            if(j % 4 == 0)
            {
                System.out.println('\n');
                k++;
                System.out.print("Line Number " + k + "  :");
            }
            System.out.print(' ');
            System.out.print(' ');
            System.out.print('[');
            System.out.print(Long.toString((long)abyte0[j] & 255L, 16));
            System.out.print('|');
            System.out.print((char)abyte0[j]);
            System.out.print(']');
        }

        System.out.print("\n-------------------------------------------------------------------");
    }

    public static final int LEN_CMPP_HEADER = 12;
    public static final int LEN_CMPP_CONNECT = 31;
    public static final int LEN_CMPP_CONNECT_REP = 1;
    public static final int LEN_CMPP_TERMINATE = 0;
    public static final int LEN_CMPP_TERMINATE_REP = 0;
    public static final int LEN_CMPP_SUBMIT = 99;
    public static final int LEN_CMPP_SUBMIT_REP = 5;
    public static final int LEN_CMPP_QUERY = 37;
    public static final int LEN_CMPP_QUERY_REP = 51;
    public static final int LEN_CMPP_DELIVER1 = 67;
    public static final int LEN_CMPP_DELIVER2 = 56;
    public static final int LEN_CMPP_DELIVER_REP = 5;
    public static final int LEN_CMPP_CANCEL = 4;
    public static final int LEN_CMPP_CANCEL_REP = 1;
    public static final int LEN_CMPP_ACTIVE_TEST = 0;
    public static final int LEN_CMPP_ACTIVE_TEST_REP = 1;
    public static final int LEN_CMPP_FWD = 112;
    public static final int LEN_CMPP_FWD_REP = 7;
    public static final int LEN_CMPP_MT_ROUTE = 27;
    public static final int LEN_CMPP_MT_ROUTE_REP = 44;
    public static final int LEN_CMPP_MO_ROUTE = 41;
    public static final int LEN_CMPP_MO_ROUTE_REP = 57;
    public static final int LEN_CMPP_GET_ROUTE = 12;
    public static final int LEN_CMPP_GET_ROUTE_REP = 62;
    public static final int LEN_MAX_CONTENT = 160;
    public static final int LEN_MAX_CONTENT_BINARY = 140;
    public static final int TIMEOUT = 60000;
    public static final int CMPP_OK = 0;
    public static final int CMPP_ERROR_WRITE = -101;
    public static final int SUBMIT_ERROR_FEETYPR = -1;
    public static final int SUBMIT_ERROR_USERTYPE = -2;
    public static final int SUBMIT_ERROR_REGISTERED_DELIVERY = -3;
    public static final int SUBMIT_ERROR_MSG_FMT = -4;
    public static final int SUBMIT_ERROR_DESTUSR_TL = -5;
    public static final int SUBMIT_ERROR_DEST_TERMINAL_ID = -6;
    public static final int SUBMIT_ERROR_MESSAGE_LENGTH = -7;
    public static final int SUBMITREP_ERROR_RESULT = -8;
    public static final int CONNREP_ERROR_STATUS = -9;
    public static final int QUERY_ERROR_TYPE = -10;
    public static final int QUERYREP_ERROR_TYPE = -11;
    public static final int DELIVER_ERROR_REGISTERED_DELIVERY = -12;
    public static final int DELIVER_ERROR_MSG_FMT = -13;
    public static final int DELIVERREP_ERROR_RESULT = -14;
    public static final int DELIVERREP_ERROR_TIME_FORMAT = -15;
    public static final int CANCELREP_ERROR_SUCCESSID = -16;
    public static final int ACTIVE_ERROR_SUCCESSID = -17;
    public static final int FWD_ERROR_TYPE = -18;
    public static final int FWD_ERROR_FEETYPE = -19;
    public static final int FWD_ERROR_REGISTERED_DELIVERY = -20;
    public static final int FWD_ERROR_MSG_FMT = -21;
    public static final int FWD_ERROR_DESTUSR_TL = -22;
    public static final int FWD_ERROR_DEST_TERMINAL_ID = -23;
    public static final int FWD_ERROR_MESSAGE_LENGTH = -24;
    public static final int FWDREP_ERROR_RESULT = -25;
    public static final int MTREP_ERROR_RESULT = -26;
    public static final int MOREP_ERROR_RESULT = -27;
    public static final int ID_CMPP_CONNECT = 1;
    public static final int ID_CMPP_CONNECT_REP = 0x80000001;
    public static final int ID_CMPP_TERMINATE = 2;
    public static final int ID_CMPP_TERMINATE_REP = 0x80000002;
    public static final int ID_CMPP_SUBMIT = 4;
    public static final int ID_CMPP_SUBMIT_REP = 0x80000004;
    public static final int ID_CMPP_DELIVER = 5;
    public static final int ID_CMPP_DELIVER_REP = 0x80000005;
    public static final int ID_CMPP_QUERY = 6;
    public static final int ID_CMPP_QUERY_REP = 0x80000006;
    public static final int ID_CMPP_CANCEL = 7;
    public static final int ID_CMPP_CANCEL_REP = 0x80000007;
    public static final int ID_CMPP_ACTIVE_TEST = 8;
    public static final int ID_CMPP_ACTIVE_TEST_REP = 0x80000008;
    public static final int ID_CMPP_FWD = 9;
    public static final int ID_CMPP_FWD_REP = 0x80000009;
    public static final int ID_CMPP_MT_ROUTE = 16;
    public static final int ID_CMPP_MT_ROUTE_REP = 0x80000010;
    public static final int ID_CMPP_MO_ROUTE = 17;
    public static final int ID_CMPP_MO_ROUTE_REP = 0x80000011;
    public static final int ID_CMPP_GET_ROUTE = 18;
    public static final int ID_CMPP_GET_ROUTE_REP = 0x80000012;
    public static final int MSG_TYPE_ASCII = 0;
    public static final int MSG_TYPE_WRITECARD = 3;
    public static final int MSG_TYPE_BINARY = 4;
    public static final int MSG_TYPE_UCS2 = 8;
    public static final int MSG_TYPE_CHINESE = 15;
    public static final int READ_CMPP_INVALID = 0;
    public static final int READ_CMPP_CONNECT = 1;
    public static final int READ_CMPP_TERMINATE = 2;
    public static final int READ_CMPP_SUBMIT = 4;
    public static final int READ_CMPP_DELIVER = 5;
    public static final int READ_CMPP_QUERY = 6;
    public static final int READ_CMPP_CANCEL = 7;
    public static final int READ_CMPP_ACTIVE_TEST = 8;
    public static final int READ_CMPP_FWD = 9;
}

⌨️ 快捷键说明

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