Write Stream<String> to a file?
spullara at gmail.com
Tue Nov 19 15:35:13 PST 2013
Hmmm. Maybe something like:
Charset cs = Charset.forName("UTF-8");
Stream<String> oldfile = Files.lines(Paths.get(args), cs);
Files.write(Paths.get(args), oldfile::iterator, cs);
On Nov 19, 2013, at 3:19 PM, Zhong Yu <zhong.j.yu at gmail.com> 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