/** * Parse the values from the CSVReader. * @param mapper Mapping strategy for the bean. * @param csv CSVReader * @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, boolean throwExceptions) { setMappingStrategy(mapper); setCsvReader(csv); this.setThrowExceptions(throwExceptions); 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 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, boolean throwExceptions) { setMappingStrategy(mapper); setCsvReader(new CSVReaderBuilder(reader).withErrorLocale(errorLocale).build()); 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. * @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(); }
bean.setThrowExceptions(throwExceptions); bean.setOrderedResults(orderedResults); if(filter != null) { bean.setFilter(filter); }