I'm trying to read a fixed-width flat file with JRecordBind. Each line can be a subrecord of the previous one and the first line and the last one are header and footer of root record.
Example:
xxxxxxxxxxxxx -> Record1 header with list of Records2
yyyyyyyyyyy1h -> Record2 instance 1header with list of Records3
@@@@@@@@@@@@1 -> Record3 instance1
@@@@@@@@@@@@2 -> Record3 instance2
yyyyyyyyyyy1f -> Record2 footer
yyyyyyyyyyy2h
@@@@@@@@@@@@3
@@@@@@@@@@@@4
yyyyyyyyyyy2f
zzzzzzz
My problem is the size of the file with many records (in my case 140,000), a StackOverFlow exception is thrown.
I'm analyzing BeanIO as an alternative to JRecordBind.
What is the best option with these kind of files?