I have mentioned only part of a code. so I need to check if the records are invalid and write in to file. So if the size of the file is greater than 1. I need to copy those records from the original file to the new file. How do I do it
public void startProcessing()
{
for (String fileName : fileNames)
{ OutputRecords outputRecords = generateOutputRecords(fileName);
List<EDCOutputRecord> listOfEdcOutputRecords = outputRecords.getValidOutputRecords();
List<EDCOutputRecord> listOfInvalidApplicantTypeRecords = outputRecords.getInvalidApplicantTypeRecord();
outputFileWriter.writeIntoFile(listOfEdcOutputRecords); inputFileHandler.moveInputFileToProcessedDirectory(fileName);
}
}