code: private static byte[] writeCsv(String[] columnHeaders, List<String[]> rows) throws IOException {
      return writeCsv(columnHeaders, rows.stream().toArray(String[][]::new));
    }
docs: Writes a CSV file
  
  @param columnHeaders headers
  @param rows rows
  @return CSV file
  @throws IOException throws IOException when CSV writing fails