Package ghidra.util.search.memory
Class MemoryAddressSetCharSequence
java.lang.Object
ghidra.util.search.memory.MemoryAddressSetCharSequence
- All Implemented Interfaces:
CharSequence
This class implements the CharSequence interface using Memory and an AddressSet. The
idea is that each byte in memory at the addresses specified in the AddressSet will form
a contiguous sequence of characters.
-
Constructor Summary
ConstructorDescriptionMemoryAddressSetCharSequence
(Memory memory, Address start, Address end) MemoryAddressSetCharSequence
(Memory memory, AddressSetView addressSet) -
Method Summary
Modifier and TypeMethodDescriptionchar
charAt
(int index) getAddressAtIndex
(int index) Takes an index and returns the matching Addressint
length()
subSequence
(int start, int end) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.CharSequence
chars, codePoints, isEmpty, toString
-
Constructor Details
-
MemoryAddressSetCharSequence
public MemoryAddressSetCharSequence(Memory memory, AddressSetView addressSet) throws MemoryAccessException - Throws:
MemoryAccessException
-
MemoryAddressSetCharSequence
public MemoryAddressSetCharSequence(Memory memory, Address start, Address end) throws MemoryAccessException - Throws:
MemoryAccessException
-
-
Method Details
-
getAddressAtIndex
Takes an index and returns the matching Address- Parameters:
index
- index to search on- Returns:
- Address address matched to index
-
length
public int length()- Specified by:
length
in interfaceCharSequence
-
charAt
public char charAt(int index) - Specified by:
charAt
in interfaceCharSequence
-
subSequence
- Specified by:
subSequence
in interfaceCharSequence
-