Class CsvDecoder

  • All Implemented Interfaces:
    IDecoder<List<org.apache.commons.csv.CSVRecord>>

    public class CsvDecoder
    extends Object
    implements IDecoder<List<org.apache.commons.csv.CSVRecord>>
    CsvDecoder is the decoder for CSV data.
    • Field Detail

      • CSV_FORMAT

        private static final org.apache.commons.csv.CSVFormat CSV_FORMAT
        The CSV format object used to parse the CSV file.
    • Constructor Detail

      • CsvDecoder

        public CsvDecoder()
    • Method Detail

      • decode

        public List<org.apache.commons.csv.CSVRecord> decode​(String data,
                                                             Object... args)
                                                      throws IOException
        The decode method is used to decode the CSV file.
        Specified by:
        decode in interface IDecoder<List<org.apache.commons.csv.CSVRecord>>
        Parameters:
        data - the CSV file
        args - the arguments
        Returns:
        the list of CSV Records
        Throws:
        IOException - if an I/O error occurs