code: void writeRecord(EngineOutputRecord eor) throws IOException {
          // eventually compress as well.
          writer.writeRecord(eor, writeMAC, writeCipher);
  
          /*
           * Check the sequence number state
           *
           * Note that in order to maintain the connection I/O
           * properly, we check the sequence number after the last
           * record writing process. As we request renegotiation
           * or close the connection for wrapped sequence number
           * when there is enough sequence number space left to
           * handle a few more records, so the sequence number
           * of the last record cannot be wrapped.
           */
          if ((connectionState < cs_ERROR) && !isOutboundDone()) {
              checkSequenceNumber(writeMAC, eor.contentType());
          }
      }
docs: /*
  Non-application OutputRecords go through here.