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

📄 bindresp.java

📁 联通的SGIP协议Java实现
💻 JAVA
字号:
package spApi;

import java.io.OutputStream;
import java.io.PrintStream;

public class BindResp extends SGIP_Command
{
  private static final int CommandLength = 9;
  private static final int CommandID = -2147483647;
  private int Result;
  private int flag = 1;
/**
 * ++++++++++++++++++构造方法+++++++++++++++++
 * @param paramLong
 */
  public BindResp(long paramLong)
  {
    super(paramLong, 9, -2147483647);
  }
/**
 * 
 * @param paramSGIP_Command
 */
  public BindResp(SGIP_Command paramSGIP_Command) {
    super(paramSGIP_Command); }

  public BindResp(MsgHead paramMsgHead) {
    super(paramMsgHead, 9, -2147483647); }

  public BindResp() {
    super(9, -2147483647);
  }

  public int GetFlag()
  {
    return this.flag;
  }

  public BindResp(long paramLong, int paramInt)
  {
    super(paramLong, 9, -2147483647);
    this.Result = paramInt;
    this.bodybytes[0] = SGIP_Command.IntToByte(paramInt);
  }

  public int readbody()
  {
    this.Result = this.bodybytes[0];
    this.flag = 0;
    return 0;
  }

  public int GetResult() {
    return this.Result; }

  public void SetResult(int paramInt) {
    this.Result = paramInt;
    this.bodybytes[0] = SGIP_Command.IntToByte(paramInt);
  }

  public int write(OutputStream paramOutputStream)
  {
    byte[] arrayOfByte;
    try
    {
      arrayOfByte = new byte[this.TotalLength];
      SGIP_Command.BytesCopy(this.head.Head, arrayOfByte, 0, 19, 0);
      SGIP_Command.BytesCopy(this.bodybytes, arrayOfByte, 0, this.TotalLength - 20 - 1, 20);
      paramOutputStream.write(arrayOfByte);
      this.flag = 1;
      return 0;
    } catch (Exception localException) {
      System.out.println(localException.toString()); }
    return -1;
  }
}

⌨️ 快捷键说明

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