Class OmfUtils
java.lang.Object
ghidra.app.util.bin.format.omf.OmfUtils
Utility class for OMF-based file formats
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Stream<T> filterRecords(List<OmfRecord> records, Class<T> classType) static final StringgetRecordName(int type, Class<?> recordTypesClass) Gets the name of the given record typestatic OmfIndexreadIndex(BinaryReader reader) static Omf2or4readInt2Or4(BinaryReader reader, boolean isBig) readRecords(AbstractOmfRecordFactory factory) Reads all therecordsassociated with the givenAbstractOmfRecordFactorystatic OmfStringreadString(BinaryReader reader) Read the OMF string format: 1-byte length, followed by that many ascii charactersstatic DataTypetoOmfRecordDataType(OmfRecord record, String name)
-
Field Details
-
CATEGORY_PATH
-
-
Constructor Details
-
OmfUtils
public OmfUtils()
-
-
Method Details
-
readInt2Or4
- Throws:
IOException
-
readIndex
- Throws:
IOException
-
readString
Read the OMF string format: 1-byte length, followed by that many ascii characters- Parameters:
reader- ABinaryReaderpositioned at the start of the string- Returns:
- the read OMF string
- Throws:
IOException- if an IO-related error occurred
-
getRecordName
-
toOmfRecordDataType
-
readRecords
public static List<OmfRecord> readRecords(AbstractOmfRecordFactory factory) throws OmfException, IOException Reads all therecordsassociated with the givenAbstractOmfRecordFactory- Parameters:
factory- TheAbstractOmfRecordFactory- Returns:
- A
Listof readrecords - Throws:
IOException- if there was an IO-related errorOmfException- if there was a problem with the OMF specification
-
filterRecords
-