ChannelStream

abstract class ChannelStream : ByteStream

Variant of a ByteStream with a streaming payload read from an SdkByteReadChannel

Constructors

Link copied to clipboard
constructor()

Inherited properties

Link copied to clipboard
open val contentLength: Long? = null

The content length if known

Link copied to clipboard
open val isOneShot: Boolean = true

Flag indicating if the body can only be consumed once. If false the underlying stream must be capable of being replayed.

Functions

Link copied to clipboard

Provides SdkByteReadChannel to read from/consume.

Inherited functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Consume the ByteStream and pull the entire contents into memory as a ByteArray. Only do this if you are sure the contents fit in-memory as this will read the entire contents of a streaming variant.

Link copied to clipboard
fun ByteStream.toFlow(bufferSize: Long = 8192): <Error class: unknown class><ByteArray>

Return a Flow that consumes the underlying ByteStream when collected.