Class LinkedByteBuffer.Position

java.lang.Object
ghidra.program.model.pcode.LinkedByteBuffer.Position
Enclosing class:
LinkedByteBuffer

public static class LinkedByteBuffer.Position extends Object
An iterator into the byte buffer
  • Field Details

  • Constructor Details

    • Position

      public Position()
  • Method Details

    • copy

      public void copy(LinkedByteBuffer.Position pos)
      Set this to be a copy of another Position
      Parameters:
      pos - is the Position being copied
    • getByte

      public final byte getByte()
      Return the byte at the current Position. Do not advance the Position.
      Returns:
      the byte at this Position
    • getBytePlus1

      public final byte getBytePlus1() throws DecoderException
      Lookahead exactly one byte, without advancing this Position
      Returns:
      the byte after the one at this Position
      Throws:
      DecoderException - if the end of stream is reached
    • getNextByte

      public final byte getNextByte() throws DecoderException
      Advance this Position by exactly one byte and return the next byte.
      Returns:
      the next byte
      Throws:
      DecoderException - if the end of stream is reached
    • advancePosition

      public final void advancePosition(int skip) throws DecoderException
      Advance this Position by the specified number of bytes
      Parameters:
      skip - is the specified number of bytes to advance
      Throws:
      DecoderException - if the end of stream is reached