readTextExactBytes

fun Input.readTextExactBytes(charset: Charset = Charsets.UTF_8, bytes: Int): String

Read exactly the specified number of bytes interpreting bytes in the specified charset (optional, UTF-8 by default).


fun Input.readTextExactBytes(bytesCount: Int, charset: Charset = Charsets.UTF_8): String

Read exactly bytesCount interpreting bytes in the specified charset (optional, UTF-8 by default).