I am new to spring batch and need some help in parsing this file. I need to read this sample file where contents are between START_OF_FILE and END_OF_FILE tags. I need to read list of fields from START_OF_FIELDS and END_OF_FIELDS and then based on that read columns from START_OF_DATA and END_OF_DATA section. How can I read specific section of the file and read subsequent lines based on what was read from pervious section ? Thank you for your help in advance.
START_OF_FILE
STARRT_OF_FIELDS
COL2
COL3
END_OF_FIELDS
START_OF_DATA
COL1|COL2|COL3|COL4
COL1|COL2|COL3|COL4
COL1|COL2|COL3|COL4
COL1|COL2|COL3|COL4
COL1|COL2|COL3|COL4
END_OF_DATA
END_OF_FILE