code: private void reinitializeBufferedReader() throws IOException, AsyncApiException {
      // close reader and get a new input stream to reconnect to resolve intermittent network errors
      this.bulkBufferedReader.close();
      this.bulkBufferedReader = getBulkBufferedReader(this.bulkResultIdCount - 1);
  
      // if the result set is partially processed then we need to skip over processed records
      if (!isNewBulkResultSet()) {
        List<String> lastCsvRecord = null;
        InputStreamCSVReader reader = new InputStreamCSVReader(this.bulkBufferedReader);
  
        // skip header
        reader.nextRecord();
  
        int recordsToSkip = this.bulkRecordCount - this.prevBulkRecordCount;
        log.info("Skipping {} records on retry: ", recordsToSkip);
  
        for (int i = 0; i < recordsToSkip; i++) {
          lastCsvRecord = reader.nextRecord();
        }
  
        // make sure the last record processed before the error was the last record skipped so that the next
        // unprocessed record is processed in the next call to fetchResultBatch()
        if (recordsToSkip > 0) {
          if (!this.csvRecord.equals(lastCsvRecord)) {
            throw new RuntimeException("Repositioning after reconnecting did not point to the expected record");
          }
        }
      }
    }
docs: Reinitialize the state of {@link #bulkBufferedReader} to handle network disconnects
  @throws IOException
  @throws AsyncApiException