kotlin read all bytes from inputstream code example
Example: kotlin read all bytes from inputstream
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()