Package ghidra.app.util.opinion

# Class IntelHexRecord

java.lang.Object
ghidra.app.util.opinion.IntelHexRecord

public class IntelHexRecord extends Object

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `DATA_RECORD_TYPE`
  `static final int`
  `END_OF_FILE_RECORD_TYPE`
  `static final int`
  `EXTENDED_LINEAR_ADDRESS_RECORD_TYPE`
  `static final int`
  `EXTENDED_SEGMENT_ADDRESS_RECORD_TYPE`
  `static final int`
  `MAX_RECORD_LENGTH`
  `static final int`
  `START_LINEAR_ADDRESS_RECORD_TYPE`
  `static final 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

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object obj)`
  `String`
  `format()`
  `int`
  `getActualChecksum()`
  `byte[]`
  `getData()`
  `String`
  `getDataString()`
  `int`
  `getLoadOffset()`
  `int`
  `getRecordLength()`
  `int`
  `getRecordType()`
  `int`
  `getReportedChecksum()`
  `int`
  `hashCode()`
  `boolean`
  `isReportedChecksumCorrect()`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### 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 Details

  - ### 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 Details

  - ### getRecordLength

    public int getRecordLength()

  - ### getLoadOffset

    public int getLoadOffset()

  - ### getRecordType

    public int getRecordType()

  - ### getData

    public byte[] getData()

  - ### getDataString

    public String getDataString()

  - ### getReportedChecksum

    public int getReportedChecksum()

  - ### getActualChecksum

    public int getActualChecksum()

  - ### isReportedChecksumCorrect

    public boolean isReportedChecksumCorrect()

  - ### format

    public String format()

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### equals

    public boolean equals(Object obj)
    Overrides:
      `equals` in class `Object`