Write Stream<String> to a file?

Brian Goetz brian.goetz at oracle.com
Tue Nov 19 16:47:36 PST 2013


How about:

     stream.forEachOrdered(writer::write);

On 11/19/2013 6:19 PM, Zhong Yu wrote:
> We have convenience methods to read lines from a file:
>      Stream<String> Files.lines()
>
> What's Java's idiomatic way to write a Stream<String> to a file?
>
> Zhong Yu
>


More information about the lambda-dev mailing list