readText
fun Input.readText(out: Appendable, charset: Charset = Charsets.UTF_8, max: Int = Int.MAX_VALUE): Int
Reads at most max characters decoding bytes with specified charset. Extra character bytes will remain unconsumed
Return
number of characters copied to out
Reads at most max characters decoding bytes with specified charset. Extra character bytes will remain unconsumed
Return
a decoded string
fun Buffer.readText(decoder: CharsetDecoder, out: Appendable, lastBuffer: Boolean, max: Int = Int.MAX_VALUE): Int
Deprecated (with error)
This is no longer supported. Read from a packet instead.
Deprecated
Use CharsetDecoder.decode instead
Replace with
import io.ktor.utils.io.charsets.decode
Content copied to clipboard
decoder.decode(this, max)
Content copied to clipboard
Reads at most max characters decoding bytes with specified decoder. Extra character bytes will remain unconsumed
Return
a decoded string
fun ByteReadPacket.readText(decoder: CharsetDecoder, out: Appendable, max: Int = Int.MAX_VALUE): Int
Deprecated (with error)
Migrate parameters order
Replace with
readText(out, decoder, max)
Content copied to clipboard