MemoryBody

data class MemoryBody(val payload: ByteBuffer) : Body

Represents a body that is backed by an in-memory ByteBuffer. Closing this has no effect.

Constructors

Link copied to clipboard
constructor(payload: String)
constructor(payload: ByteArray)
constructor(payload: ByteBuffer)

Properties

Link copied to clipboard
open override val length: Long

Will be null for bodies where it's impossible to a priori determine - e.g. StreamBody

Link copied to clipboard
open override val payload: ByteBuffer
Link copied to clipboard
open override val stream: ByteArrayInputStream

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun Body.gzipped(compressionLevel: Int = DEFAULT_COMPRESSION): CompressionResult
Link copied to clipboard
fun Body.gzippedStream(compressionLevel: Int = DEFAULT_COMPRESSION): CompressionResult
Link copied to clipboard
open override fun toString(): String