ktor-io / io.ktor.utils.io.core / readTextExactBytes

readTextExactBytes

fun Input.readTextExactBytes(charset: Charset = Charsets.UTF_8, bytes: Int): String
Deprecated: Parameters order is changed.

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).