Package net.sf.rej.util

Examples of net.sf.rej.util.ByteSerializer


    this.index = (int) ByteToolkit.getLong(data, 1, 1, true);
  }

  @Override
  public byte[] getData(DecompilationContext dc) {
    ByteSerializer ser = new ByteSerializer(true);
    ser.addByte(OPCODE);
    ser.addByte(this.index);

    return ser.getBytes();
  }
View Full Code Here


  public void setWideData(byte[] data, DecompilationContext dc) {
    this.index = (int) ByteToolkit.getLong(data, 2, 2, true);
  }

  public byte[] getWideData(DecompilationContext dc) {
    ByteSerializer ser = new ByteSerializer(true);
    ser.addByte(_wide.OPCODE);
    ser.addByte(OPCODE);
    ser.addShort(this.index);

    return ser.getBytes();
  }
View Full Code Here

    this.value = (int) ByteToolkit.getLong(data, 1, 1, true);
  }

  @Override
  public byte[] getData(DecompilationContext dc) {
    ByteSerializer ser = new ByteSerializer(true);
    ser.addByte(OPCODE);
    ser.addByte(this.value);
    return ser.getBytes();
  }
View Full Code Here

    this.label = new Label(addr);
  }

  @Override
  public byte[] getData(DecompilationContext dc) {
    ByteSerializer ser = new ByteSerializer(true);
    ser.addByte(OPCODE);
    ser.addShort(this.label.getPosition() - dc.getPosition());
    return ser.getBytes();
  }
View Full Code Here

    this.label = new Label(addr);
  }

  @Override
  public byte[] getData(DecompilationContext dc) {
    ByteSerializer ser = new ByteSerializer(true);
    ser.addByte(OPCODE);
    ser.addShort(this.label.getPosition() - dc.getPosition());
    return ser.getBytes();
  }
View Full Code Here

    this.index = (int) ByteToolkit.getLong(data, 1, 1, true);
  }

  @Override
  public byte[] getData(DecompilationContext dc) {
    ByteSerializer ser = new ByteSerializer(true);
    ser.addByte(OPCODE);
    ser.addByte(this.index);
    return ser.getBytes();
  }
View Full Code Here

  public void setWideData(byte[] data, DecompilationContext dc) {
    this.index = (int) ByteToolkit.getLong(data, 2, 2, true);
  }

  public byte[] getWideData(DecompilationContext dc) {
    ByteSerializer ser = new ByteSerializer(true);
    ser.addByte(_wide.OPCODE);
    ser.addByte(OPCODE);
    ser.addShort(this.index);

    return ser.getBytes();
  }
View Full Code Here

    this.index = (int) ByteToolkit.getLong(data, 1, 1, true);
  }

  @Override
  public byte[] getData(DecompilationContext dc) {
    ByteSerializer ser = new ByteSerializer(true);
    ser.addByte(OPCODE);
    ser.addByte(this.index);
    return ser.getBytes();
  }
View Full Code Here

  public int getWideSize(DecompilationContext dc) {
    return WIDE_SIZE;
  }

  public byte[] getWideData(DecompilationContext dc) {
    ByteSerializer ser = new ByteSerializer(true);
    ser.addByte(_wide.OPCODE);
    ser.addByte(OPCODE);
    ser.addShort(this.index);
    return ser.getBytes();
  }
View Full Code Here

    }
  }

  @Override
  public byte[] getData(DecompilationContext dc) {
    ByteSerializer ser = new ByteSerializer(true);
    ser.addByte(OPCODE);
    while ((ser.size() + dc.getPosition()) % 4 != 0) {
      ser.addByte(0);
    }

    ser.addInt(this.def.getPosition() - dc.getPosition());
    ser.addInt(this.low);
    ser.addInt(this.high);

    for (int i = this.low; i <= this.high; i++) {
      Label l = this.offsets.get(i);
      if (l != null) {
        ser.addInt(l.getPosition() - dc.getPosition());
      } else {
        ser.addInt(this.def.getPosition() - dc.getPosition());
      }
    }

    return ser.getBytes();
  }
View Full Code Here

TOP

Related Classes of net.sf.rej.util.ByteSerializer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.