BufferContent

class BufferContent(buffer: Buffer, charset: Charset, val byteSize: Long = buffer.size) : BodyFilterResult.Content(source)

Implements the BodyFilterResult.Content interface, representing a filtering result that contains readable content from a buffer.

This class provides functionality to decode the content of a given buffer into a string using the specified charset. It also includes the size of the buffer as its byte size.

Report a problem

Constructors

Link copied to clipboard
constructor(buffer: Buffer, charset: Charset, byteSize: Long = buffer.size)

Properties

Link copied to clipboard
open override val byteSize: Long

The size of the buffer in bytes.

Functions

Link copied to clipboard
open override fun read(): String