class MultipartDecoder
source · line 9public class MultipartDecoder public constructor(
/**
* The validated delimiter boundary used by this codec.
*/
public val boundary: MultipartBoundary,
limits: MultipartLimits = multipartLimits()
) : Closeable
- Supertype
Closeable - Inherited
fun dispose(): Unit· Closeable
An incremental multipart parser with bounded headers, parts, and body events. Drain an event before feeding more input; calls on one instance must not overlap.
property isClosed
source · line 23public val isClosed: Boolean
get: public read-only
Whether local parser state has been closed.
getter get
source · line 23get(): Boolean
constructor constructor
source · line 9constructor(public val boundary: MultipartBoundary, limits: MultipartLimits = multipartLimits())
parameter boundary
source · line 13public val boundary: MultipartBoundary
parameter limits
source · line 14limits: MultipartLimits = multipartLimits()
property isFinished
source · line 32public val isFinished: Boolean
get: public read-only
Whether the codec has completed its terminal operation and, for a decoder, drained pending events.
getter get
source · line 32get(): Boolean
function receive
source · line 42public fun receive(buffer: NativeByteBuffer, count: Long = buffer.readableBytes): Long
Consumes a prefix of the readable buffer and advances by the returned count. A pending event can stop progress; drain events before supplying more bytes.
parameter buffer
source · line 42buffer: NativeByteBuffer
parameter count
source · line 42count: Long = buffer.readableBytes
function nextEvent
source · line 78public fun nextEvent(): MultipartEvent?
Removes the next parsed event, or returns None when no event is ready.
function close
source · line 108public override fun close(): Unit
- Overrides
close
Releases local state without emitting bytes or finishing an incomplete message.
function endInput
source · line 92public fun endInput(): Unit
Reports EOF, validates completion, and rejects a truncated multipart message.
property failure
source · line 36public val failure: Throwable?
get: public read-only
The retained parse failure, if the decoder has failed.
getter get
source · line 36get(): Option<Throwable>
property boundary
source · line 13public val boundary: MultipartBoundary
get: public read-only
The validated delimiter boundary used by this codec.
property isComplete
source · line 27public val isComplete: Boolean
get: public read-only
Whether the closing multipart boundary has been recognized.
getter get
source · line 27get(): Boolean