Package ghidra.app.util.opinion
Class IntelHexRecord
- java.lang.Object
-
- ghidra.app.util.opinion.IntelHexRecord
-
public class IntelHexRecord extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static int
DATA_RECORD_TYPE
static int
END_OF_FILE_RECORD_TYPE
static int
EXTENDED_LINEAR_ADDRESS_RECORD_TYPE
static int
EXTENDED_SEGMENT_ADDRESS_RECORD_TYPE
static int
MAX_RECORD_LENGTH
static int
START_LINEAR_ADDRESS_RECORD_TYPE
static int
START_SEGMENT_ADDRESS_RECORD
-
Constructor Summary
Constructors Constructor Description IntelHexRecord(int recordLength, int loadOffset, int recordType, byte[] data)
Only use this constructor when writing...it computes the checksum for you (cheating)!IntelHexRecord(int recordLength, int loadOffset, int recordType, byte[] data, int checksum)
Use this constructor when reading, so you know if the record's checksum is correct.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
java.lang.String
format()
int
getActualChecksum()
byte[]
getData()
java.lang.String
getDataString()
int
getLoadOffset()
int
getRecordLength()
int
getRecordType()
int
getReportedChecksum()
int
hashCode()
boolean
isReportedChecksumCorrect()
-
-
-
Field Detail
-
MAX_RECORD_LENGTH
public static final int MAX_RECORD_LENGTH
- See Also:
- Constant Field Values
-
DATA_RECORD_TYPE
public static final int DATA_RECORD_TYPE
- See Also:
- Constant Field Values
-
END_OF_FILE_RECORD_TYPE
public static final int END_OF_FILE_RECORD_TYPE
- See Also:
- Constant Field Values
-
EXTENDED_SEGMENT_ADDRESS_RECORD_TYPE
public static final int EXTENDED_SEGMENT_ADDRESS_RECORD_TYPE
- See Also:
- Constant Field Values
-
START_SEGMENT_ADDRESS_RECORD
public static final int START_SEGMENT_ADDRESS_RECORD
- See Also:
- Constant Field Values
-
EXTENDED_LINEAR_ADDRESS_RECORD_TYPE
public static final int EXTENDED_LINEAR_ADDRESS_RECORD_TYPE
- See Also:
- Constant Field Values
-
START_LINEAR_ADDRESS_RECORD_TYPE
public static final int START_LINEAR_ADDRESS_RECORD_TYPE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
IntelHexRecord
public IntelHexRecord(int recordLength, int loadOffset, int recordType, byte[] data, int checksum)
Use this constructor when reading, so you know if the record's checksum is correct.- Parameters:
recordLength
-loadOffset
-recordType
-data
-checksum
-
-
IntelHexRecord
public IntelHexRecord(int recordLength, int loadOffset, int recordType, byte[] data)
Only use this constructor when writing...it computes the checksum for you (cheating)!- Parameters:
recordLength
-loadOffset
-recordType
-data
-
-
-
Method Detail
-
getRecordLength
public int getRecordLength()
-
getLoadOffset
public int getLoadOffset()
-
getRecordType
public int getRecordType()
-
getData
public byte[] getData()
-
getDataString
public java.lang.String getDataString()
-
getReportedChecksum
public int getReportedChecksum()
-
getActualChecksum
public int getActualChecksum()
-
isReportedChecksumCorrect
public boolean isReportedChecksumCorrect()
-
format
public java.lang.String format()
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-