class CsvDatasetReader extends AbstractDataset {

	@Override
	public long size() {
		if (size == -1) {
			try (InputStream inputStream = config.openInputStream()) {
				int lineNumber = FileHelper.getNumberOfLines(inputStream);
				size = Math.min(config.readHeader() ? lineNumber - 1 : lineNumber, config.getLimit());
			} catch (IOException e) {
				throw new IllegalStateException("IOException for" + config.filePath());
			}
		}
		return size;
	}

	@Deprecated public  CsvDatasetReader(File filePath);
	@Deprecated public  CsvDatasetReader(File filePath, boolean readHeader);
	@Deprecated public  CsvDatasetReader(File filePath, boolean readHeader, String fieldSeparator);
	public  CsvDatasetReader(CsvDatasetReaderConfig config);

}