Kotlin Read All Inputstream

[Solved] Kotlin Read All Inputstream | Kotlin - Code Explorer | yomemimo.com
Question : kotlin read all inputstream

Answered by : dan

val ins: InputStream;
// both close stream after use
val text = ins.bufferedReader().use { it.readText() }
val text = ins.reader().use { it.readText() }
// doesn't close stream after use
val text = ins.reader().readText()

Source : | Last Update : Thu, 11 Feb 21

Answers related to kotlin read all inputstream

Code Explorer Popular Question For Kotlin