Output

expect interface Output : Appendable, Closeable

This shouldn't be implemented directly. Inherit AbstractOutput instead.

actual interface Output : Closeable, Appendable

This shouldn't be implemented directly. Inherit AbstractOutput instead.

actual interface Output : Closeable

Functions

append
Link copied to clipboard
expect abstract fun append(value: Char): Appendable
expect abstract fun append(value: CharSequence?): Appendable
expect abstract fun append(csq: CharArray, start: Int, end: Int): Appendable
expect abstract fun append(value: CharSequence?, startIndex: Int, endIndex: Int): Appendable
abstract fun append(p0: Char): Appendable
abstract fun append(p0: CharSequence): Appendable
actual abstract fun append(csq: CharArray, start: Int, end: Int): Appendable
abstract fun append(p0: CharSequence, p1: Int, p2: Int): Appendable
actual abstract fun append(csq: CharArray, start: Int, end: Int): Appendable
Link copied to clipboard
expect abstract override fun close()
actual abstract override fun close()
actual abstract override fun close()
Link copied to clipboard
expect open fun fill(n: Long, v: Byte)
actual open fun fill(n: Long, v: Byte)
actual open fun fill(n: Long, v: Byte)
Link copied to clipboard
expect abstract fun flush()
actual abstract fun flush()
actual abstract fun flush()
Link copied to clipboard
expect abstract fun writeByte(v: Byte)
actual abstract fun writeByte(v: Byte)
actual abstract fun writeByte(v: Byte)
Link copied to clipboard
expect open fun writeDouble(v: Double)
actual open fun writeDouble(v: Double)
actual open fun writeDouble(v: Double)
Link copied to clipboard
expect open fun writeFloat(v: Float)
actual open fun writeFloat(v: Float)
actual 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)
open fun writeFully(bb: ByteBuffer)
actual open fun writeFully(src: IoBuffer, length: Int)
actual open fun writeFully(src: ByteArray, offset: Int, length: Int)
actual open fun writeFully(src: DoubleArray, offset: Int, length: Int)
actual open fun writeFully(src: FloatArray, offset: Int, length: Int)
actual open fun writeFully(src: IntArray, offset: Int, length: Int)
actual open fun writeFully(src: LongArray, offset: Int, length: Int)
actual open fun writeFully(src: ShortArray, offset: Int, length: Int)
actual open fun writeFully(src: IoBuffer, length: Int)
open fun writeFully(src: <ERROR CLASS><<ERROR CLASS>>, offset: Int, length: Int)
open fun writeFully(src: <ERROR CLASS><<ERROR CLASS>>, offset: Long, length: Long)
actual open fun writeFully(src: ByteArray, offset: Int, length: Int)
actual open fun writeFully(src: DoubleArray, offset: Int, length: Int)
actual open fun writeFully(src: FloatArray, offset: Int, length: Int)
actual open fun writeFully(src: IntArray, offset: Int, length: Int)
actual open fun writeFully(src: LongArray, offset: Int, length: Int)
actual open fun writeFully(src: ShortArray, offset: Int, length: Int)
Link copied to clipboard
expect open fun writeInt(v: Int)
actual open fun writeInt(v: Int)
actual open fun writeInt(v: Int)
Link copied to clipboard
expect open fun writeLong(v: Long)
actual open fun writeLong(v: Long)
actual open fun writeLong(v: Long)
Link copied to clipboard
expect open fun writeShort(v: Short)
actual open fun writeShort(v: Short)
actual open fun writeShort(v: Short)

Properties

Link copied to clipboard
expect abstract var byteOrder: ByteOrder
actual abstract var byteOrder: ByteOrder
actual abstract var byteOrder: ByteOrder

Inheritors

Link copied to clipboard
Link copied to clipboard

Extensions

Link copied to clipboard
fun Output.afterHeadWrite(current: IoBuffer)
fun Output.afterHeadWrite(current: ChunkBuffer)
Link copied to clipboard
fun Output.append(csq: CharSequence, start: Int = 0, end: Int = csq.length): Appendable
fun Output.append(csq: CharArray, start: Int = 0, end: Int = csq.size): Appendable
Link copied to clipboard
fun Output.fill(times: Long, value: Byte = 0)
Link copied to clipboard
fun Output.prepareWriteHead(capacity: Int, current: IoBuffer?): IoBuffer
fun Output.prepareWriteHead(capacity: Int, current: ChunkBuffer?): ChunkBuffer
Link copied to clipboard
fun Output.writeDouble(value: Double, byteOrder: ByteOrder)
fun Output.writeDouble(value: Double)
Link copied to clipboard
fun Output.writeDoubleLittleEndian(value: Double)
Link copied to clipboard
fun Output.writeFloat(value: Float, byteOrder: ByteOrder)
fun Output.writeFloat(value: Float)
Link copied to clipboard
fun Output.writeFloatLittleEndian(value: Float)
Link copied to clipboard
fun Output.writeFully(src: ByteArray, offset: Int = 0, length: Int = src.size - offset)
fun Output.writeFully(src: ShortArray, offset: Int = 0, length: Int = src.size - offset)
fun Output.writeFully(src: IntArray, offset: Int = 0, length: Int = src.size - offset)
fun Output.writeFully(src: LongArray, offset: Int = 0, length: Int = src.size - offset)
fun Output.writeFully(src: FloatArray, offset: Int = 0, length: Int = src.size - offset)
fun Output.writeFully(src: DoubleArray, offset: Int = 0, length: Int = src.size - offset)
fun Output.writeFully(src: IoBuffer, length: Int = src.readRemaining)
fun Output.writeFully(src: Buffer, length: Int = src.readRemaining)
fun Output.writeFully(src: Memory, offset: Int, length: Int)
fun Output.writeFully(src: Memory, offset: Long, length: Long)
inline fun Output.writeFully(array: UByteArray, offset: Int = 0, length: Int = array.size - offset)
inline fun Output.writeFully(array: UShortArray, offset: Int = 0, length: Int = array.size - offset)
inline fun Output.writeFully(array: UIntArray, offset: Int = 0, length: Int = array.size - offset)
inline fun Output.writeFully(array: ULongArray, offset: Int = 0, length: Int = array.size - offset)
fun Output.writeFully(bb: ByteBuffer)
fun Output.writeFully(src: <ERROR CLASS><<ERROR CLASS>>, offset: Int, length: Int)
fun Output.writeFully(src: <ERROR CLASS><<ERROR CLASS>>, offset: Long, length: Long)
Link copied to clipboard
fun Output.writeFullyLittleEndian(source: UShortArray, offset: Int = 0, length: Int = source.size - offset)
fun Output.writeFullyLittleEndian(source: ShortArray, offset: Int = 0, length: Int = source.size - offset)
fun Output.writeFullyLittleEndian(source: UIntArray, offset: Int = 0, length: Int = source.size - offset)
fun Output.writeFullyLittleEndian(source: IntArray, offset: Int = 0, length: Int = source.size - offset)
fun Output.writeFullyLittleEndian(source: ULongArray, offset: Int = 0, length: Int = source.size - offset)
fun Output.writeFullyLittleEndian(source: LongArray, offset: Int = 0, length: Int = source.size - offset)
fun Output.writeFullyLittleEndian(source: FloatArray, offset: Int = 0, length: Int = source.size - offset)
fun Output.writeFullyLittleEndian(source: DoubleArray, offset: Int = 0, length: Int = source.size - offset)
Link copied to clipboard
fun Output.writeInt(value: Int, byteOrder: ByteOrder)
fun Output.writeInt(value: Int)
Link copied to clipboard
fun Output.writeIntLittleEndian(value: Int)
Link copied to clipboard
fun Output.writeLong(value: Long, byteOrder: ByteOrder)
fun Output.writeLong(value: Long)
Link copied to clipboard
fun Output.writeLongLittleEndian(value: Long)
Link copied to clipboard
fun Output.writePacket(packet: ByteReadPacket)
Link copied to clipboard
fun Output.writeShort(value: Short, byteOrder: ByteOrder)
fun Output.writeShort(value: Short)
Link copied to clipboard
fun Output.writeShortLittleEndian(value: Short)
Link copied to clipboard
fun Output.writeText(text: CharSequence, fromIndex: Int = 0, toIndex: Int = text.length, encoder: CharsetEncoder)

Writes text characters in range \[fromIndex .. toIndex) with the specified encoder

fun Output.writeText(text: CharSequence, fromIndex: Int = 0, toIndex: Int = text.length, charset: Charset = Charsets.UTF_8)
fun Output.writeText(text: CharArray, fromIndex: Int = 0, toIndex: Int = text.size, charset: Charset = Charsets.UTF_8)

Writes text characters in range \[fromIndex .. toIndex) with the specified charset

Link copied to clipboard
inline fun Output.writeUByte(v: UByte)
Link copied to clipboard
inline fun Output.writeUInt(v: UInt)
Link copied to clipboard
inline fun Output.writeULong(v: ULong)
Link copied to clipboard
inline fun Output.writeUShort(v: UShort)
Link copied to clipboard
inline fun Output.writeWhile(block: (Buffer) -> Boolean)

Append number of chunks invoking block function while the returned value is true. Depending on the output underlying implementation it could invoke block function with the same buffer several times however it is guaranteed that it is always non-empty.

Link copied to clipboard
inline fun Output.writeWhileSize(initialSize: Int = 1, block: (Buffer) -> Int)

Append number of chunks invoking block function while the returned value is positive. If returned value is positive then it will be invoked again with a buffer having at least requested number of bytes space (could be the same buffer as before if it complies to the restriction).