I am processing a text file which contains up to a thousand lines. There are multiple headers and footers in one text file. So I don't need to process the line which contains @h and @f. It tells me the beginning and end of a transaction (Database transaction, I will save those records to DB in one transaction).
A sample record is below. Though the line reaches up to a thousand lines and the columns are up to 40 columns. From each line I am only looking for a specific data i.e (e.g i need to get a name from postion 8 to 30, year from position 60 to 67 and the likes). This position might be next a space or between strings. So I don't want to put the data of each line in to buffer/memory to process it because, I am only interested on few of them. Does CSV file allows to get a data from a specific position in a line? What should I use to get a better performance (to process the data as quick as possible without taking much memory.)? I am using Java
@h Header
@074VH01MATT TARA A5119812073921 RONG HI DE BET IA76200 201108222 0500 *
@074VH01KAYT DJ A5119812073921 RONG DED CR BET IA71200 201108222 0500 *
@f Footer
@h Header
@074VH01MATT TARA A5119812073921 RONG HI DE BET IA76200 201108222 0500 *
@074VH01KAYT DJ A5119812073921 RONG DED CR BET IA71200 201108222 0500 *
@f Footer