class MultipartSink
source · line 11public class MultipartSink private constructor(private val writer: MultipartWriter) : AsyncCloseable
- Supertype
AsyncCloseable
A sequential multipart writer over a borrowed sink by default. Finish each part and then the whole multipart message explicitly.
property failure
source · line 39public val failure: Throwable?
get: public read-only
The retained terminal exception, or None before failure.
getter get
source · line 39get(): Option<Throwable>
function flush
source · line 48public suspend fun flush(): Unit
Drains pending multipart output without completing a part or the message.
function close
source · line 57public override suspend fun close(): Unit
- Overrides
close
Closes parser/writer state and an endpoint whose ownership was transferred; borrowed endpoints retain their own cleanup responsibility.
property isFinished
source · line 35public val isFinished: Boolean
get: public read-only
Whether the complete protocol boundary or input end has been reached.
getter get
source · line 35get(): Boolean
function finish
source · line 52public suspend fun finish(): Unit
Writes the final multipart boundary and drains output.
constructor constructor
source · line 12constructor(sink: AsyncByteSink, boundary: MultipartBoundary, bufferSize: Long = 8192L)
parameter boundary
source · line 12boundary: MultipartBoundary
parameter sink
source · line 12sink: AsyncByteSink
parameter bufferSize
source · line 12bufferSize: Long = 8192L
function beginPart
source · line 44public suspend fun beginPart(head: MultipartPartHead): MultipartPartWriter
Writes the next part header and returns its body writer; the previous part must already be finished.
parameter head
source · line 44head: MultipartPartHead
property isClosed
source · line 31public val isClosed: Boolean
get: public read-only
Whether adapter cleanup has completed.
getter get
source · line 31get(): Boolean