📜  kotlin 从输入流中读取所有字节 - Kotlin 代码示例

📅  最后修改于: 2022-03-11 14:53:32.157000             🧑  作者: 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()