With Java 8 and streams I do not really get how the exception handling should work when composing several functions?
I would like to write the following:
Arrays.stream((File[]) files).flatMap(file -> Files.lines(file.toPath()));
The compiler says there is an unhandled IOException at "Files.lines(...)
"
Putting try catch around this statement does not work and declaring a throws not as well.