Package org.dbunit.dataset.csv
Class CsvParserImpl
java.lang.Object
org.dbunit.dataset.csv.CsvParserImpl
- All Implemented Interfaces:
CsvParser
CsvParser implementation that tokenizes a line of CSV text using the
Pipeline character-handling framework.- Since:
- 2.2 (Sep 12, 2004)
- Version:
- $Revision$ $Date$
- Author:
- fede, Last changed by: $Author$
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionParses the CSV content of the given file.Parses the CSV content read from the given reader.Parses a single line of CSV text into its individual field values.Parses the CSV content at the given URL.
-
Constructor Details
-
CsvParserImpl
public CsvParserImpl()Default constructor.
-
-
Method Details
-
parse
Description copied from interface:CsvParserParses a single line of CSV text into its individual field values.- Specified by:
parsein interfaceCsvParser- Parameters:
csv- the line of CSV text to parse.- Returns:
- the parsed field values.
- Throws:
PipelineException- if the character-handling pipeline fails.IllegalInputCharacterException- if the input contains a character no handler accepts.
-
parse
Description copied from interface:CsvParserParses the CSV content of the given file.- Specified by:
parsein interfaceCsvParser- Parameters:
file- the file to parse.- Returns:
- the parsed rows, each a list of field values, first row being the column names.
- Throws:
IOException- if the file cannot be read.CsvParserException- if the CSV content is malformed.
-
parse
Description copied from interface:CsvParserParses the CSV content at the given URL.- Specified by:
parsein interfaceCsvParser- Parameters:
url- the URL to parse.- Returns:
- the parsed rows, each a list of field values, first row being the column names.
- Throws:
IOException- if the URL cannot be read.CsvParserException- if the CSV content is malformed.
-
parse
Parses the CSV content read from the given reader.- Parameters:
reader- the reader to parse.source- a description of the source being read, used in error messages.- Returns:
- the parsed rows, each a list of field values, first row being the column names.
- Throws:
IOException- if the reader cannot be read.CsvParserException- if the CSV content is malformed.
-