Package ghidra.app.util.bin
Class MemoryMutableByteProvider
java.lang.Object
ghidra.app.util.bin.MemoryByteProvider
ghidra.app.util.bin.MemoryMutableByteProvider
- All Implemented Interfaces:
ByteProvider
,MutableByteProvider
,Closeable
,AutoCloseable
A Byte Provider implementation based on Memory.
-
Field Summary
Fields inherited from class ghidra.app.util.bin.MemoryByteProvider
baseAddress, isEmtpy, maxOffset, memory
Fields inherited from interface ghidra.app.util.bin.ByteProvider
EMPTY_BYTEPROVIDER
-
Constructor Summary
ConstructorDescriptionMemoryMutableByteProvider
(Memory memory, Address baseAddress) Constructs a new provider relative to the base address.MemoryMutableByteProvider
(Memory memory, AddressSpace space) Constructs a new provider for a specific address space. -
Method Summary
Modifier and TypeMethodDescriptionvoid
writeByte
(long index, byte value) Writes a byte at the specified index.void
writeBytes
(long index, byte[] values) Writes a byte array at the specified index.Methods inherited from class ghidra.app.util.bin.MemoryByteProvider
close, createDefaultAddressSpaceByteProvider, createMemoryBlockByteProvider, createProgramHeaderByteProvider, getAbsolutePath, getAddressSet, getEndAddress, getFile, getName, getStartAddress, isEmpty, isValidIndex, length, readByte, readBytes
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ghidra.app.util.bin.ByteProvider
close, getAbsolutePath, getFile, getFSRL, getInputStream, getName, isEmpty, isValidIndex, length, readByte, readBytes
-
Constructor Details
-
MemoryMutableByteProvider
Constructs a new provider for a specific address space.- Parameters:
memory
- the memoryspace
- the address space
-
MemoryMutableByteProvider
Constructs a new provider relative to the base address.- Parameters:
memory
- the memorybaseAddress
- the relative base address
-
-
Method Details
-
writeByte
Description copied from interface:MutableByteProvider
Writes a byte at the specified index.- Specified by:
writeByte
in interfaceMutableByteProvider
- Parameters:
index
- the index to write the bytevalue
- the value to write at the specified index- Throws:
IOException
- if an I/O error occurs
-
writeBytes
Description copied from interface:MutableByteProvider
Writes a byte array at the specified index.- Specified by:
writeBytes
in interfaceMutableByteProvider
- Parameters:
index
- the index to write the byte arrayvalues
- the values to write at the specified index- Throws:
IOException
- if an I/O error occurs
-