📄 cmppcancel.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: CMPPCancel.java
package com.cmpp3_0.process;
import com.cmpp3_0.body.BodyCancel;
import com.cmpp3_0.body.Header;
import com.cmpp3_0.util.CMPPUtil;
import com.cmpp3_0.util.Logger;
import java.io.*;
import java.net.SocketException;
// Referenced classes of package com.cmpp3_0.process:
// CMPPSocket, CMPPAPIs
public class CMPPCancel
{
private byte bodyBytes[];
private byte headBytes[];
private Header headContent;
private CMPPSocket socket;
public CMPPCancel(CMPPSocket socket)
{
headContent = new Header(20, 7, 0);
this.socket = socket;
headBytes = new byte[12];
bodyBytes = new byte[8];
CMPPUtil.bytesCopy(CMPPUtil.intToFourBytes(headContent.getTotalLength()), headBytes, 0, 4, 0);
CMPPUtil.bytesCopy(CMPPUtil.intToFourBytes(headContent.getCommandId()), headBytes, 0, 4, 4);
CMPPUtil.bytesCopy(CMPPUtil.intToFourBytes(headContent.getSeqId()), headBytes, 0, 4, 8);
}
public int getSequenceId()
{
return headContent.getSeqId();
}
public int getTotalLength()
{
return headContent.getTotalLength();
}
public int sendCancel()
{
int result = 0;
socket.out.write(headBytes);
socket.out.write(bodyBytes);
socket.out.flush();
break MISSING_BLOCK_LABEL_94;
SocketException se;
se;
Logger.writeLog(-2, "CANCEL FAILURE: SOCKET_EXCEPTION!--可能是TCP/IP连接出现错误 -- 发送取消短信包失败!", "cmpp");
result = -503;
return result;
IOException ie;
ie;
Logger.writeLog(-2, "CANCEL FAILURE: IO_EXCEPTION! -- 发送取消短信包失败!", "cmpp");
result = -110;
return result;
Exception e;
e;
Logger.writeLog(-2, "CANCEL FAILURE: EXCEPTION! -- 发送取消短信包失败!", "cmpp");
result = -111;
return result;
if(CMPPAPIs.isDebugMode())
System.out.println("发送了取消短信包!");
return result;
}
public void setBodyContent(BodyCancel bodyCancel)
{
CMPPUtil.bytesCopy(CMPPUtil.longToEightBytes(bodyCancel.msgId), bodyBytes, 0, 8, 0);
}
public void setSequenceId(int seqId)
{
headContent.setSeqId(seqId);
CMPPUtil.bytesCopy(CMPPUtil.intToFourBytes(seqId), headBytes, 0, 4, 8);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -