@ServicepublicclassFileService{publicList<FileReadDTO>readFileFromFTPAndGenerateObjects(Pathpath)throwsIOException{List<FileReadDTO>list1;try{Files.lines(path).forEach(item->System.out.println(item));list1=Files.lines(path).collect(newCustomFileCollector());list1.forEach(item->{System.out.println(item.getPlanNbr());System.out.println(item.getSsnNumber());});}catch(IOExceptione){thrownewIOException("no such file");}returnlist1;}}
Comments (0)
HTTPSSSH
You can clone a snippet to your computer for local editing.
Learn more.