kantsu
11/16/2017, 10:00 PMwhile (`in`!!.readLine() != null) {
line = `in`!!.readLine()
outputText += line
}
gildor
11/17/2017, 2:18 AMval input: InputStream = ...
val outputText = input.bufferedReader().readText()
val input: InputStream = ...
input.bufferedReader().forEachLine { line ->
//Do something with line
}
input.use{}
for the first case (don’t required for the second case)Czar
11/17/2017, 4:55 AM