AbstractOutput

abstract class AbstractOutput : Appendable, Output

The default Output implementation.

See also

Constructors

Link copied to clipboard
fun AbstractOutput(pool: ObjectPool<ChunkBuffer>)
Link copied to clipboard
fun AbstractOutput()

Functions

Link copied to clipboard
fun afterHeadWrite()
Link copied to clipboard
open override fun append(c: Char): AbstractOutput

Append single UTF-8 character

open override fun append(csq: CharSequence?): AbstractOutput
open override fun append(csq: CharArray, start: Int, end: Int): Appendable
open override fun append(csq: CharSequence?, start: Int, end: Int): AbstractOutput
Link copied to clipboard
fun appendNewBuffer(): IoBuffer
Link copied to clipboard
override fun close()

Should flush and close the destination

Link copied to clipboard
expect open fun fill(n: Long, v: Byte)
Link copied to clipboard
override fun flush()
Link copied to clipboard
fun prepareWriteHead(n: Int): ChunkBuffer
Link copied to clipboard
fun release()

Release any resources that the builder holds. Builder shouldn't be used after release

Link copied to clipboard
open fun reset()
Link copied to clipboard
override fun writeByte(v: Byte)
Link copied to clipboard
expect open fun writeDouble(v: Double)
Link copied to clipboard
expect open fun writeFloat(v: Float)
Link copied to clipboard
expect open fun writeFully(src: IoBuffer, length: Int)
expect open fun writeFully(src: ByteArray, offset: Int, length: Int)
expect open fun writeFully(src: DoubleArray, offset: Int, length: Int)
expect open fun writeFully(src: FloatArray, offset: Int, length: Int)
expect open fun writeFully(src: IntArray, offset: Int, length: Int)
expect open fun writeFully(src: LongArray, offset: Int, length: Int)
expect open fun writeFully(src: ShortArray, offset: Int, length: Int)
Link copied to clipboard
expect open fun writeInt(v: Int)
Link copied to clipboard
expect open fun writeLong(v: Long)
Link copied to clipboard
fun writePacket(p: ByteReadPacket)

Writes another packet to the end. Please note that the instance p gets consumed so you don't need to release it

fun writePacket(p: ByteReadPacket, n: Int)
fun writePacket(p: ByteReadPacket, n: Long)

Write exact n bytes from packet to the builder

Link copied to clipboard
expect open fun writeShort(v: Short)
Link copied to clipboard
fun writeStringUtf8(cs: CharSequence)
fun writeStringUtf8(s: String)

Properties

Link copied to clipboard
override var byteOrder: ByteOrder

Byte order (Endianness) to be used by future write functions calls on this builder instance. Doesn't affect any previously written values.

Inheritors

Link copied to clipboard