📄 cmppdeliverresp.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: CMPPDeliverResp.java
package com.cmpp3_0.process;
import com.cmpp3_0.body.BodyDeliverResp;
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
public class CMPPDeliverResp
{
private byte bodyBytes[];
private byte headBytes[];
private Header headContent;
private CMPPSocket socket;
public CMPPDeliverResp(CMPPSocket socket)
{
headContent = new Header();
this.socket = socket;
headContent.setTotalLength(24);
headContent.setCommandId(0x80000005);
headContent.setSeqId(0);
bodyBytes = new byte[12];
headBytes = new byte[12];
CMPPUtil.bytesCopy(CMPPUtil.intToFourBytes(24), headBytes, 0, 4, 0);
CMPPUtil.bytesCopy(CMPPUtil.intToFourBytes(headContent.getCommandId()), headBytes, 0, 4, 4);
}
public int getSequenceId()
{
return headContent.getSeqId();
}
public int getTotalLength()
{
return headContent.getTotalLength();
}
public int sendDeliverResp()
{
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, "DELIVERRESP FAILURE: SOCKET_EXCEPTION!--可能是TCP/IP连接出现错误 -- 发送接受短信的回复包失败!", "cmpp");
result = -501;
return result;
IOException ie;
ie;
Logger.writeLog(-2, "DELIVERRESP FAILURE: IO_EXCEPTION! -- 发送接受短信的回复包失败!", "cmpp");
result = -112;
return result;
Exception e;
e;
Logger.writeLog(-2, "DELIVERRESP FAILURE: EXCEPTION! -- 发送接受短信的回复包失败!", "cmpp");
result = -113;
return result;
return result;
}
public void setBodyContent(BodyDeliverResp bodyDeliverResp)
{
headContent.setSeqId(bodyDeliverResp.seqId);
CMPPUtil.bytesCopy(CMPPUtil.intToFourBytes(bodyDeliverResp.seqId), headBytes, 0, 4, 8);
CMPPUtil.bytesCopy(bodyDeliverResp.msgIdBytes, bodyBytes, 0, 8, 0);
for(int i = 0; i < 8; i++)
System.out.println("msgId[" + i + "] : " + bodyBytes[i]);
CMPPUtil.bytesCopy(CMPPUtil.intToFourBytes(bodyDeliverResp.result), bodyBytes, 0, 4, 8);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -