Convert InputStream into Stream<String> given a Charset
16,777
I think you can try:
Stream<String> lines = new BufferedReader(new InputStreamReader(is, cs)).lines();
Author by
principal-ideal-domain
Updated on June 09, 2022Comments
-
principal-ideal-domain almost 2 years
I want to convert an
InputStream is
into aStream<String> stream
given aCharset cs
in such a way thatstream
consists of the lines ofis
. Furthermore a line ofis
should not be read immediately but only in casestream
needs it.