It's probably better to write the number of Vehicules that are in the file at the beginning, and let that control how many you read.
If you want to do it the way you are doing it, then you will have to try/catch an IOException
[also btw, this isn't a txt file]