Forum Stats

  • 3,722,216 Users
  • 2,244,253 Discussions
  • 7,849,707 Comments

Discussions

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

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.