Last active
April 10, 2020 16:55
-
-
Save Raouf25/20b981f38a01cd0d76bfe4216684aba3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
files.stream() | |
.parallel() | |
.map(file-> { | |
try { | |
return file.getInputStream(); | |
} catch (IOException e) { | |
e.printStackTrace(); | |
return null; | |
} | |
}) | |
.forEach(inputStream -> carService.saveCars(inputStream)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment