There is no nice way to convert given boolean[] foo array into stream in Java-8 in one statement, or I am missing something?
boolean[] foo
(I
You can use Guava's Booleans class:
Stream stream = Booleans.asList(foo).stream();
This is a pretty efficient way because Booleans.asList returns a wrapper for the array and does not make any copies.
Booleans.asList