de.erichseifert.gral.io.data
Class CSVReader
java.lang.Object
de.erichseifert.gral.io.IOCapabilitiesStorage
de.erichseifert.gral.io.data.AbstractDataReader
de.erichseifert.gral.io.data.CSVReader
- All Implemented Interfaces:
- DataReader
public class CSVReader
- extends AbstractDataReader
Class that reads a DataSource from a CSV-file. By default the semicolon
character will be used for separating columns.
- See Also:
- RFC 4180
Constructor Summary |
CSVReader(String mimeType)
Creates a new CSVReader with the specified MIME type. |
CSVReader
public CSVReader(String mimeType)
- Creates a new CSVReader with the specified MIME type.
- Parameters:
mimeType
- MIME type of the file format to be read.
read
public DataSource read(InputStream input,
Class<? extends Number>... types)
throws IOException,
ParseException
- Description copied from interface:
DataReader
- Returns a DataSource that was imported.
- Parameters:
input
- Input to be read.types
- Number types for the columns of the DataSource.
- Returns:
- DataSource Imported data.
- Throws:
IOException
- when experiencing an error during file operations.
ParseException
- when the file format is not valid.
Copyright © 2009-2010. All Rights Reserved.