Some CSV files contain one or more lines of text before the actual CSV data starts.
For example, it could look like this:
Strictly speaking, such a file is not a valid CSV file as defined by the CSV specification
(RFC 4180).
The main problem with those files is:
An exception would be thrown unless the options ignoreDifferentFieldCount() and skipEmptyLines() are set.
When working with named fields, the very first line (This is an example of a CSV file that contains)
would be interpreted as the actual header line.
FastCSV comes with two features to handle such files:
skipLines(int lineCount): Skip a specific number of lines (lineCount) regardless of their content.
skipLines(Predicate<String> predicate, int maxLines): Skip lines until a specific line (e.g., the header) is found.
Stop skipping after a specific number of lines (maxLines).
Example
This example demonstrates how to skip non-CSV head lines when reading such a CSV file with FastCSV.