asBytes

fun Flow<String>.asBytes(charset: Charset = Charset.defaultCharset()): Flow<Byte>

Converts the Flow of String to a Flow of Byte using the specified charset.

Return

A new Flow of Byte converted from the original Flow of String.

Parameters

charset

The Charset to use for converting the strings to bytes. Defaults to the system's default charset.