?? cmppsubmit.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: cmppSubmit.java
package com.aspire.cmppApi;
import java.io.*;
// Referenced classes of package com.aspire.cmppApi:
// cmppCommon, cmppSocket
public class cmppSubmit
{
byte MsgId[];
int PkTotal;
int PkNumber;
int RegisteredDelivery;
int MsgLevel;
String ServiceId;
int FeeUserType;
String feeterminalid;
int tppid;
int tpudhi;
int MsgFmt;
String MsgSrc;
String FeeType;
String FeeCode;
String ValidTime;
String AtTime;
String SrcTerminalId;
int DestUsrTl;
String DestTerminalId;
int MsgLength;
byte MsgContent[];
String Reverse;
private int TotalLength;
private int CommandID;
private int SequenceId;
public byte bodybytes[];
public byte headbytes[];
cmppSocket conn;
int pos;
public cmppSubmit(cmppSocket cmppsocket)
{
DestUsrTl = 1;
pos = 299;
bodybytes = new byte[307];
headbytes = new byte[12];
pos = 299;
CommandID = 4;
TotalLength = 319;
conn = cmppsocket;
SequenceId = 0;
PkTotal = 0;
PkNumber = 0;
RegisteredDelivery = 1;
MsgLevel = 1;
ServiceId = "";
FeeUserType = 1;
feeterminalid = "";
tppid = 0;
tpudhi = 0;
MsgFmt = 8;
MsgSrc = "";
FeeType = "";
FeeCode = "";
ValidTime = "";
AtTime = "";
SrcTerminalId = "";
DestUsrTl = 1;
DestTerminalId = "";
MsgLength = 160;
MsgContent = new byte[160];
Reverse = "";
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);
int i = 0;
MsgId = new byte[8];
cmppCommon.BytesCopy(MsgId, bodybytes, 0, 7, i);
i += 8;
bodybytes[i] = (byte)PkTotal;
i++;
bodybytes[i] = (byte)PkNumber;
i++;
bodybytes[i] = (byte)RegisteredDelivery;
i++;
bodybytes[i] = (byte)MsgLevel;
i++;
byte abyte0[] = new byte[10];
ServiceId.getBytes(0, ServiceId.length(), abyte0, 0);
cmppCommon.BytesCopy(abyte0, bodybytes, 0, 9, i);
i += 10;
bodybytes[i] = (byte)FeeUserType;
i++;
abyte0 = new byte[21];
feeterminalid.getBytes(0, feeterminalid.length(), abyte0, 0);
cmppCommon.BytesCopy(abyte0, bodybytes, 0, 20, i);
i += 21;
bodybytes[i] = (byte)tppid;
i++;
bodybytes[i] = (byte)tpudhi;
i++;
bodybytes[i] = (byte)MsgFmt;
i++;
abyte0 = new byte[6];
MsgSrc.getBytes(0, MsgSrc.length(), abyte0, 0);
cmppCommon.BytesCopy(abyte0, bodybytes, 0, 5, i);
i += 6;
abyte0 = new byte[2];
FeeType.getBytes(0, FeeType.length(), abyte0, 0);
cmppCommon.BytesCopy(abyte0, bodybytes, 0, 1, i);
i += 2;
abyte0 = new byte[6];
FeeCode.getBytes(0, FeeCode.length(), abyte0, 0);
cmppCommon.BytesCopy(abyte0, bodybytes, 0, 5, i);
i += 6;
abyte0 = new byte[17];
ValidTime.getBytes(0, ValidTime.length(), abyte0, 0);
cmppCommon.BytesCopy(abyte0, bodybytes, 0, 16, i);
i += 17;
abyte0 = new byte[17];
AtTime.getBytes(0, AtTime.length(), abyte0, 0);
cmppCommon.BytesCopy(abyte0, bodybytes, 0, 16, i);
i += 17;
abyte0 = new byte[21];
SrcTerminalId.getBytes(0, SrcTerminalId.length(), abyte0, 0);
cmppCommon.BytesCopy(abyte0, bodybytes, 0, 20, i);
i += 21;
bodybytes[i] = (byte)DestUsrTl;
i++;
int j = 21 * DestUsrTl;
abyte0 = new byte[j];
DestTerminalId.getBytes(0, DestTerminalId.length(), abyte0, 0);
cmppCommon.BytesCopy(abyte0, bodybytes, 0, j - 1, i);
i += j;
bodybytes[i] = (byte)MsgLength;
i++;
cmppCommon.BytesCopy(MsgContent, bodybytes, 0, MsgLength - 1, i);
i += MsgLength;
}
public int getTotalLength()
{
return TotalLength;
}
public int sendCmppSubmit()
{
int i = 0;
synchronized(conn)
{
try
{
conn.bout.write(headbytes);
byte abyte0[] = new byte[TotalLength - 12];
cmppCommon.BytesCopy(bodybytes, abyte0, 0, TotalLength - 13, 0);
conn.bout.write(abyte0);
conn.bout.flush();
}
catch(IOException ioexception)
{
System.out.println(ioexception.toString());
i = -5;
int j = i;
return j;
}
}
return i;
}
public void setAtTime(String s)
{
AtTime = s;
byte abyte0[] = new byte[17];
s.getBytes(0, s.length(), abyte0, 0);
cmppCommon.BytesCopy(abyte0, bodybytes, 0, 16, 78);
}
public void setFeeCode(String s)
{
FeeCode = s;
byte abyte0[] = new byte[6];
s.getBytes(0, s.length(), abyte0, 0);
cmppCommon.BytesCopy(abyte0, bodybytes, 0, 5, 55);
}
public void setFeeType(String s)
{
FeeType = s;
byte abyte0[] = new byte[2];
s.getBytes(0, s.length(), abyte0, 0);
cmppCommon.BytesCopy(abyte0, bodybytes, 0, 1, 53);
}
public void setFeeUserType(int i)
{
FeeUserType = i;
bodybytes[22] = (byte)i;
}
public void setFeeterminalid(String s)
{
feeterminalid = s;
byte abyte0[] = new byte[21];
s.getBytes(0, s.length(), abyte0, 0);
cmppCommon.BytesCopy(abyte0, bodybytes, 0, 20, 23);
}
public void setMsgFmt(int i)
{
MsgFmt = i;
bodybytes[46] = (byte)i;
}
public void setMsgId(byte MsgId[])
{
this.MsgId = MsgId;
cmppCommon.BytesCopy(MsgId, bodybytes, 0, 7, 0);
}
public void setMsgLevel(int i)
{
MsgLevel = i;
bodybytes[11] = (byte)i;
}
public void setMsgSrc(String s)
{
MsgSrc = s;
byte abyte0[] = new byte[6];
s.getBytes(0, s.length(), abyte0, 0);
cmppCommon.BytesCopy(abyte0, bodybytes, 0, 5, 47);
}
public void setPkNumber(int i)
{
PkNumber = i;
bodybytes[9] = (byte)i;
}
public void setPkTotal(int i)
{
PkTotal = i;
bodybytes[8] = (byte)i;
}
public void setRegisteredDelivery(int i)
{
RegisteredDelivery = i;
bodybytes[10] = (byte)i;
}
public void setRequiredItems(String s, int i, byte abyte0[])
{
byte abyte1[] = null;
MsgContent = abyte0;
MsgLength = abyte0.length;
DestTerminalId = s;
byte abyte2[] = new byte[abyte0.length];
for(int j = 0; j < abyte0.length; j++)
abyte2[j] = abyte0[j];
TotalLength = 147 + i + 12;
cmppCommon.BytesCopy(cmppCommon.IntToBytes4(TotalLength), headbytes, 0, 3, 0);
abyte1 = new byte[21];
s.getBytes(0, s.length(), abyte1, 0);
cmppCommon.BytesCopy(abyte1, bodybytes, 0, 20, 117);
bodybytes[138] = (byte)i;
cmppCommon.BytesCopy(abyte2, bodybytes, 0, i - 1, 139);
abyte1 = new byte[8];
Reverse.getBytes(0, Reverse.length(), abyte1, 0);
cmppCommon.BytesCopy(abyte1, bodybytes, 0, 7, 139 + i);
pos = 139 + i;
}
public void setReverse(String s)
{
Reverse = s;
int i = pos;
byte abyte0[] = new byte[8];
s.getBytes(0, s.length(), abyte0, 0);
cmppCommon.BytesCopy(abyte0, bodybytes, 0, 7, i);
i += 8;
}
public void setSequenceId(int i)
{
SequenceId = i;
cmppCommon.BytesCopy(cmppCommon.IntToBytes4(i), headbytes, 0, 3, 8);
}
public void setServiceId(String s)
{
ServiceId = s;
byte abyte0[] = new byte[10];
s.getBytes(0, s.length(), abyte0, 0);
cmppCommon.BytesCopy(abyte0, bodybytes, 0, 9, 12);
}
public void setSrcTerminalId(String s)
{
SrcTerminalId = s;
byte abyte0[] = new byte[21];
s.getBytes(0, s.length(), abyte0, 0);
cmppCommon.BytesCopy(abyte0, bodybytes, 0, 20, 95);
}
public void setTppid(int i)
{
tppid = i;
bodybytes[44] = (byte)i;
}
public void setTpudhi(int i)
{
tpudhi = i;
bodybytes[45] = (byte)i;
}
public void setValidTime(String s)
{
ValidTime = s;
byte abyte0[] = new byte[17];
s.getBytes(0, s.length(), abyte0, 0);
cmppCommon.BytesCopy(abyte0, bodybytes, 0, 16, 61);
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -