What exaxtly are you going to do with the file if the complete content of it is unknown? There may be better solutions if we woudl know the format/content of the input file.
_________________________
There are two types of vessels, submarines and targets.