bean-io

BeanIO - lietral is coming as extra line

断了今生、忘了曾经 提交于 2019-12-11 14:43:21
问题 Please help me to remove unwanted extra lines for below part. Current Output: 001 Name1Str1 CA 1234 001 Name2Str2 IN 4321 005 30Manager Technology 005 50Lead Technology Java Code: ArrayList<Employees1> emps = new ArrayList<>(); ArrayList<Employee1> empp1 = new ArrayList<>(); ArrayList<Employee2> empp2 = new ArrayList<>(); Employees1 employees = new Employees1(); Employee1 emp1 = new Employee1(); emp1.setSno("001"); emp1.setName("Name1"); emp1.setStreet("Str1"); emp1.setCity("CA"); emp1.setZip

Continue parsing of records if exception occurs on some record in BeanIO

别说谁变了你拦得住时间么 提交于 2019-12-08 04:55:38
问题 I am using BeanIO to convert flat file into list of Object . Using following code snippet. while ((MyCustomRecord obj = (MyCustomRecord) in.read()) != null) { System.out.println(obj); } But problem with this is, if exception occurs during parsing of some record, It immediately stops processing records. I want to suppress such exception and want it to continue processing of next records. Is there a way to do this? One thing that I can try is to put in.read in body of while block and wrap it