Convert java.util.stream.Stream to Scala Stream
I know how I can use the Java libraries, and I can write some loops that do the stuff I need for me, but the question is more, why is there nothing in scala.collection.JavaConverters or scala.collection.JavaConverstions to convert a java.util.stream.Stream to a scala.collection.immutable.Stream ? I would like to do something like this: def streamFiles(path: Path): Stream[Path] = { Files.newDirectoryStream(path).asScala } But instead I have to write something like this: def streamFiles(path: Path): Stream[Path] = { val path_it : java.util.Iterator[Path] = Files.newDirectoryStream(path).iterator