Class CSVReader

java.lang.Object
main.utils.iocontrol.CSVReader

public class CSVReader extends Object
A utility class for reading CSV files and returning their contents as a list of rows, each represented as a list of strings.
  • Constructor Details

    • CSVReader

      public CSVReader()
  • Method Details

    • read

      public static List<List<String>> read(String filePath, boolean hasHeader)
      Reads a CSV file and returns its contents as a list of rows, each represented as a list of strings.
      Parameters:
      filePath - the path of the CSV file to be read
      hasHeader - a boolean indicating whether the CSV file has a header row
      Returns:
      a list of rows, each represented as a list of strings