class HttpBodyWriter
source · line 15public
public class HttpBodyWriter internal constructor(
private val sink: AsyncByteSink,
private val length: Long?
) : AsyncByteSink
- Supertype
AsyncByteSink
A borrowed output view valid only while the framework executes one response body.
function writeFrom
source · line 34public
public override suspend fun writeFrom(buffer: NativeByteBuffer, count: Long): Long
- Overrides
writeFrom
Accepts a possibly short prefix, enforcing the declared original-content length.
parameter buffer
source · line 34public
buffer: NativeByteBuffer
parameter count
source · line 34public
count: Long
function writeText
source · line 92public
public suspend fun writeText(value: String): Unit
Writes UTF-8 text through the same bounded output path.
parameter value
source · line 92public
value: String
function writeAll
source · line 68public
public suspend fun writeAll(value: List<Byte>): Unit
Writes an entire byte sequence through a bounded buffer.
parameter value
source · line 68public
value: List<Byte>
function flush
source · line 56public
public override suspend fun flush(): Unit
- Overrides
flush
Flushes accepted bytes without finishing the response.