sgip_deliverresp.java

来自「短信开发汇总」· Java 代码 · 共 48 行

JAVA
48
字号


/**
 * <p>Title: smsproc</p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2005</p>
 *
 * <p>Company: </p>
 *
 * @author vienna
 * @version 1.0
 */
import java.io.*;

public class SGIP_DeliverResp {
    SGIP_Head head=new SGIP_Head();
    int Result;
    byte[] Reserve;
    public SGIP_DeliverResp() {
        super();
    }
    public int Length(){
        return head.Length()+9;
    }
    public int WriteProtocolData(DataOutputStream out){
        try{
            out.writeInt(head.PacketLength);
            out.writeInt(head.RequestID);
            out.writeLong(head.Seq1);
            out.write(head.Seq2);
            out.write(head.Seq3);
            out.write(Result);
            out.write(Reserve);
            if(Reserve.length<8){
                byte[] NullData=new byte[8-Reserve.length];
                out.write(NullData);
            }
        }
        catch(Exception ex){
            GlobalVar.WriteSysLog("SGIP_DeliverResp","WriteProtocolData",ex,GlobalVar.SYSTEM_BASE_ERROR_0);
            return -1;
        }
        return 0;
    }
}

⌨️ 快捷键说明

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