As westfw says there is more in each line that the pure data. There are addresses, lengths, transaction type, and also a sumcheck at the end of each line.
In particular, the functions readHexFile and processLine.
@saurabhshandilya: Please edit your post, select the code, and put it between [code] ... [/code] tags.
You can do that by hitting the "Code" button above the posting area (It looks like a scroll with < > inside it).