Class MemoryByteIterator

java.lang.Object
ghidra.program.model.util.MemoryByteIterator
All Implemented Interfaces:
Iterator<Byte>

public class MemoryByteIterator extends Object implements Iterator<Byte>
Class to iterate over the bytes in memory for an address set.
  • Field Details

  • Constructor Details

    • MemoryByteIterator

      public MemoryByteIterator(Memory mem, AddressSetView set)
      Construct a memoryIterator
      Parameters:
      mem - the memory providing the bytes
      set - the set of addresses for which to iterate bytes
  • Method Details

    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface Iterator<Byte>
    • next MODIFIED

      public Byte next()
      return type: byte → Byte; removed throws MemoryAccessException
      -byte next() throws MemoryAccessException
      +java.lang.Byte next()
      Throws:
      MemoryAccessException (removed)
      Specified by:
      next in interface Iterator<Byte>
    • nextByte NEW

      public byte nextByte()
      Returns the next primitive byte. Use this method if you want to avoid the cost of boxing Bytes the normal next() method returns.
      Returns:
      the next primitive byte. Use this method if you want to avoid the cost of boxing Bytes the normal next() method returns
      Throws:
      NoSuchElementException - if the iteration has no more elements