Scoop API

scoop:scoop.http:0.1.0

MultipartEncoder

class MultipartEncoder

source · line 10
public
public class MultipartEncoder public constructor(
    /**
     * The validated delimiter boundary used by this codec.
     */
    public val boundary: MultipartBoundary) : Closeable

An in-memory multipart writer with explicit beginPart, body, endPart, and final finish. It performs no transport I/O and close does not emit a closing boundary.

function endPart

source · line 66
public
public fun endPart(): Array<Byte>

Emits the part terminator after checking its declared body length is complete.

function finish

source · line 79
public
public fun finish(): Array<Byte>

Emits the final closing boundary; no part may remain open.

function close

source · line 90
public
public override fun close(): Unit

Releases local state without emitting bytes or finishing an incomplete message.

property isFinished

source · line 28
public
public val isFinished: Boolean

get: public read-only

Whether the codec has completed its terminal operation and, for a decoder, drained pending events.