📜  kotlin 读取所有输入流 - Kotlin 代码示例

📅  最后修改于: 2022-03-11 14:53:33.150000             🧑  作者: Mango

代码示例1
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()