class MultipartBody
source · line 9public
public class MultipartBody internal constructor(private val reader: MultipartReader) : AsyncByteSource, AsyncCloseable
- Supertype
AsyncByteSource - Supertype
AsyncCloseable
The current multipart part body, ending at its boundary rather than at transport EOF.
function close
source · line 35public
public override suspend fun close(): Unit
- Overrides
close
Closes this body; unfinished-body cleanup follows the multipart reader's abort behavior rather than an unbounded drain.
function readInto
source · line 25public
public override suspend fun readInto(buffer: NativeByteBuffer, count: Long): Long
- Overrides
readInto
Reads part bytes up to the current boundary and advances the destination buffer.
parameter buffer
source · line 25public
buffer: NativeByteBuffer
parameter count
source · line 25public
count: Long
function discard
source · line 30public
public suspend fun discard(maxBytes: Long): Long
Consumes and discards remaining part bytes up to an explicit limit, returning the discarded count.
parameter maxBytes
source · line 30public
maxBytes: Long
property isClosed
source · line 21public
public val isClosed: Boolean
get: public read-only
Whether this body or message has been closed.
getter get
source · line 21public
get(): Boolean
property isComplete
source · line 17public
public val isComplete: Boolean
get: public read-only
Whether this body or message reached its successful boundary.
getter get
source · line 17public
get(): Boolean