Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try {
- stolenCsv = new CsvBeanReader(new FileReader("C://Users//AlGrant//Desktop//ANPRStolen.csv"), CsvPreference.STANDARD_PREFERENCE);
- final String[] header = new String[]{"registration", "color", "make", null, null, null, null, null, null, null};
- final CellProcessor[] processors = getProcessors();
- StolenCar stolenCar;
- do {
- try {
- stolenCar = stolenCsv.read(StolenCar.class, header, processors);
- System.out.println(stolenCar.getRegistration() + ", " + stolenCar.getMake());
- } catch (Exception e) {
- continue;
- }
- } while ( stolenCar != null );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement