Package net.sf.rej.util

Examples of net.sf.rej.util.ByteSerializer


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

  @Override
  public byte[] getData(DecompilationContext dc) {
    ByteSerializer ser = new ByteSerializer(true);
    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 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.label = new Label(addr);
  }

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

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

  @Override
  public byte[] getData(DecompilationContext dc) {
    ByteSerializer ser = new ByteSerializer(true);
    ser.addByte(OPCODE);
    ser.addShort(this.index);
    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, 2, true);
  }

  @Override
  public byte[] getData(DecompilationContext dc) {
    ByteSerializer ser = new ByteSerializer(true);
    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.offsets.size());

    for (Entry<Integer, Label> entry : this.offsets.entrySet()) {
      ser.addInt(entry.getKey());
      ser.addInt(entry.getValue().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.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

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.