code: private void parse(Reader reader, char separator) throws IOException, ParseException {
      LOG.info("Parsing CSV file...");
      /*
       * Ideally one would configure the format using withHeader(String ...) but since the master column is optional
       * this is of no use. Therefore, you'll get null if you were to call getHeaderMap() later on the parser. The header
       * is returned as the 1st record (i.e. row).
       */
      CSVParser csvParser = CSVFormat.DEFAULT.withDelimiter(separator).withIgnoreSurroundingSpaces(true).parse(reader);
  
      List<CSVRecord> records = csvParser.getRecords();
  
      String[] header = transformHeaderMapToArray(records.get(0));
      verifyHeader(header);
  
      for (int i = 1; i < records.size(); i++) {
        CSVRecord csvRecord = records.get(i);
  
        if (csvRecord.size() != header.length) {
          throw new ParseException(String.format("Expected %d columns but got %d.",  header.length, csvRecord.size()),
            i + 1);
        }
        String key = csvRecord.get(0);
        Status status = Status.valueOf(csvRecord.get(1));
        String masterValue = null;
        String value;
        if (hasMasterLanguage()) {
          masterValue = csvRecord.get(2);
          value = csvRecord.get(3);
        } else {
          value = csvRecord.get(2);
        }
  
        // the context is irrelevant, so it is not added
        add(key, status, masterValue, value);
      }
      LOG.info("Parsing of CSV file finished.");
    }
docs: Parses a CSV file from a given reader.
  @param reader the reader
  @param separator the CSV separator
  @throws ParseException if any parse errors ocur
  @throws IOException if any IO errors occur