if("csv".equalsIgnoreCase( fileExtension )) {
logger.info("File format: [CSV]");
setDataReader( new CsvDataReader() );
} else if ("xml".equalsIgnoreCase( fileExtension ) || "txt".equalsIgnoreCase( fileExtension )) {
logger.info("File format: [XML]");
setDataReader( new XmlDataReader() );
} else {
throw new IllegalArgumentException("[" + fileExtension+ "] is not a supported file extension");
}
}