private void emitData() {
        final int length = bytes.size();
        if (length > 0) {
            int loadOffset;
            if (isSegmented) {
				loadOffset = ((SegmentedAddress) startAddress).getSegmentOffset();
            } else {
                loadOffset = (int) (startAddress.getOffset() & 0x0000ffff);
            }
            byte[] data = new byte[length];
            for (int ii = 0; ii < length; ++ii) {
                data[ii] = bytes.get(ii);
            }
            results.add(new IntelHexRecord(length, loadOffset, 0, data));
            bytes.clear();
            startAddress = null;
        }
    }
Constructor

@param maxBytesPerLine the maximum number of bytes to write per line in the hex output
@param dropExtraBytes if true, only lines matching {@link #maxBytesPerLine} will be output; 
remaining bytes will be left out
Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/IntelHexRecordWriter.java