Class MemoryMutableByteProvider

java.lang.Object
ghidra.app.util.bin.MemoryByteProvider
ghidra.app.util.bin.MemoryMutableByteProvider
All Implemented Interfaces:
ByteProvider, MutableByteProvider, Closeable, AutoCloseable

public class MemoryMutableByteProvider extends MemoryByteProvider implements MutableByteProvider
A Byte Provider implementation based on Memory.
  • Constructor Details

    • MemoryMutableByteProvider

      public MemoryMutableByteProvider(Memory memory, AddressSpace space)
      Constructs a new provider for a specific address space.
      Parameters:
      memory - the memory
      space - the address space
    • MemoryMutableByteProvider

      public MemoryMutableByteProvider(Memory memory, Address baseAddress)
      Constructs a new provider relative to the base address.
      Parameters:
      memory - the memory
      baseAddress - the relative base address
  • Method Details

    • writeByte

      public void writeByte(long index, byte value) throws IOException
      Description copied from interface: MutableByteProvider
      Writes a byte at the specified index.
      Specified by:
      writeByte in interface MutableByteProvider
      Parameters:
      index - the index to write the byte
      value - the value to write at the specified index
      Throws:
      IOException - if an I/O error occurs
    • writeBytes

      public void writeBytes(long index, byte[] values) throws IOException
      Description copied from interface: MutableByteProvider
      Writes a byte array at the specified index.
      Specified by:
      writeBytes in interface MutableByteProvider
      Parameters:
      index - the index to write the byte array
      values - the values to write at the specified index
      Throws:
      IOException - if an I/O error occurs