Forum Stats

  • 3,733,577 Users
  • 2,246,788 Discussions
  • 7,856,775 Comments

Discussions

if the size of the file is greater than 1 then write the invalid records to output file

4281104
4281104 Member Posts: 2

  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);

}

}

Sign In or Register to comment.