Advertisement
Guest User

Untitled

a guest
Aug 19th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.71 KB | None | 0 0
  1.         try {
  2.             stolenCsv = new CsvBeanReader(new FileReader("C://Users//AlGrant//Desktop//ANPRStolen.csv"), CsvPreference.STANDARD_PREFERENCE);
  3.             final String[] header = new String[]{"registration", "color", "make", null, null, null, null, null, null, null};
  4.             final CellProcessor[] processors = getProcessors();
  5.  
  6.             StolenCar stolenCar;
  7.             do {
  8.                 try {
  9.                     stolenCar = stolenCsv.read(StolenCar.class, header, processors);
  10.                     System.out.println(stolenCar.getRegistration() + ", " + stolenCar.getMake());
  11.                 } catch (Exception e) {
  12.                     continue;
  13.                 }
  14.             } while ( stolenCar != null );
  15.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement