/** * Parse the values from the CSVReader. * Throws exceptions for bad data and other sorts of problems relating * directly to opencsv, as well as general exceptions from external code * used. * * @param mapper Mapping strategy for the bean. * @param csv CSVReader * @param filter CsvToBeanFilter to apply - null if no filter. * @return List of Objects. * @deprecated Please use {@link CsvToBeanBuilder} instead. */ @Deprecated public List<T> parse(MappingStrategy<T> mapper, CSVReader csv, CsvToBeanFilter filter) { setMappingStrategy(mapper); setCsvReader(csv); this.setFilter(filter); return parse(); }
/** * Parse the values from the CSVReader. * Only throws general exceptions from external code used. Problems related * to opencsv and the data provided to it are captured for later processing * by user code and can be accessed through {@link #getCapturedExceptions()}. * * @param mapper Mapping strategy for the bean. * @param csv CSVReader * @param filter CsvToBeanFilter to apply - null if no filter. * @param throwExceptions If false, exceptions internal to opencsv will not * be thrown, but can be accessed after processing is finished through * {@link #getCapturedExceptions()}. * @return List of Objects. * @deprecated Please use {@link CsvToBeanBuilder} instead. */ @Deprecated public List<T> parse(MappingStrategy<T> mapper, CSVReader csv, CsvToBeanFilter filter, boolean throwExceptions) { setMappingStrategy(mapper); setCsvReader(csv); this.setFilter(filter); this.setThrowExceptions(throwExceptions); return parse(); }
/** * Parse the values from a CSVReader constructed from the Reader passed in. * * @param mapper Mapping strategy for the bean. * @param reader Reader used to construct a CSVReader * @param filter CsvToBeanFilter to apply - null if no filter. * @return List of Objects. * @deprecated Please use {@link CsvToBeanBuilder} instead. */ @Deprecated public List<T> parse(MappingStrategy<T> mapper, Reader reader, CsvToBeanFilter filter) { setMappingStrategy(mapper); setCsvReader(new CSVReaderBuilder(reader).withErrorLocale(errorLocale).build()); this.setFilter(filter); return parse(); }
/** * Parse the values from a CSVReader constructed from the Reader passed in. * @param mapper Mapping strategy for the bean. * @param reader Reader used to construct a CSVReader * @param filter CsvToBeanFilter to apply - null if no filter. * @param throwExceptions If false, exceptions internal to opencsv will not * be thrown, but can be accessed after processing is finished through * {@link #getCapturedExceptions()}. * @return List of Objects. * @deprecated Please use {@link CsvToBeanBuilder} instead. */ @Deprecated public List<T> parse(MappingStrategy<T> mapper, Reader reader, CsvToBeanFilter filter, boolean throwExceptions) { setMappingStrategy(mapper); setCsvReader(new CSVReaderBuilder(reader).withErrorLocale(errorLocale).build()); this.setFilter(filter); this.setThrowExceptions(throwExceptions); return parse(); }
if(filter != null) { bean.setFilter(filter); } bean.setVerifiers(verifiers);