You don't need to store the PactRecords in a list!

Use only one PactRecord and pass it into the InputFormat over and over again (this is supported by the framework).
You can use a integer variable to count the number of records. Lift the checks on the fields to the while loop, then you have exactly the same validation without storing many PactRecords in a list.