Skip to Main Content

Java User Groups

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

4281104Jul 2 2020 — edited Jul 2 2020

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

}

}

Comments
Post Details
Added on Jul 2 2020
0 comments
52 views