Oleh Ponomarenko
11/07/2019, 11:25 AMwhile ((inputLine = input.readLine()) != null) {
Log.d(TAG, inputLine);
}
Dennis Schröder
11/07/2019, 1:04 PMOleh Ponomarenko
11/07/2019, 1:04 PMStephan Schroeder
11/07/2019, 1:22 PMinputStream
of type InputStream that your BufferedReader input
is initialized on use:
val inputStream = ...
inputStream.bufferedReader().useLines { lines ->
for(line in lines) {
Log.d(TAG, line)
}
}
This will also close the inputStream.Oleh Ponomarenko
11/07/2019, 1:24 PMPavlo Liapota
11/07/2019, 5:01 PMwhile (true) {
val inputLine = input.readLine() ?: break
Log.d(TAG, inputLine);
}
Oleh Ponomarenko
11/07/2019, 5:02 PM