ByteWriter

interface ByteWriter

An interface for writing bytes and various primitive data types.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard

Creates a DataOutput that writes to this ByteWriter.

Link copied to clipboard

Creates an OutputStream that writes to this ByteWriter.

Link copied to clipboard
open fun writeBoolean(value: Boolean)

Writes a Boolean.

Link copied to clipboard
abstract fun writeByte(value: Byte)

Writes a Byte.

Link copied to clipboard
open fun writeBytes(src: ByteArray)

Writes all bytes from src.

open fun writeBytes(src: ByteArray, length: Int)

Writes length number of bytes from src.

abstract fun writeBytes(src: ByteArray, srcIndex: Int, length: Int)

Writes length number of bytes from src starting at srcIndex.

Link copied to clipboard
open fun writeChar(value: Char)

Writes a Float.

Link copied to clipboard
open fun writeDouble(value: Double)

Writes a Double.

Link copied to clipboard
open fun writeDoubleLE(value: Double)

Writes a Double in little endian.

Link copied to clipboard
open fun writeFloat(value: Float)

Writes a Float in little endian.

Link copied to clipboard
open fun writeFloatLE(value: Float)

Writes a Float in little endian.

Link copied to clipboard
open fun writeInt(value: Int)

Writes an Int.

Link copied to clipboard
open fun writeIntLE(value: Int)

Writes an Int in little endian.

Link copied to clipboard
open fun writeLong(value: Long)

Writes a Long.

Link copied to clipboard
open fun writeLongLE(value: Long)

Writes a Long in little endian.

Link copied to clipboard
open fun writeMedium(value: Int)

Writes a medium.

Link copied to clipboard
open fun writeMediumLE(value: Int)

Writes a medium in little endian.

Link copied to clipboard
open fun writeShort(value: Short)

Writes a Short.

Link copied to clipboard
open fun writeShortLE(value: Short)

Writes a Short in little endian.

Link copied to clipboard
open fun writeString(value: String)

Writes a String.

Link copied to clipboard
open fun writeUnsignedByte(value: UByte)

Writes a UByte.

Link copied to clipboard
open fun writeUnsignedInt(value: UInt)

Writes a UInt.

Link copied to clipboard
open fun writeUnsignedIntLE(value: UInt)

Writes a UInt in little endian.

Link copied to clipboard
open fun writeUnsignedLong(value: ULong)

Writes a ULong.

Link copied to clipboard
open fun writeUnsignedLongLE(value: ULong)

Writes a ULong in little endian.

Link copied to clipboard
open fun writeUnsignedMedium(value: UInt)

Writes an unsigned medium.

Link copied to clipboard
open fun writeUnsignedMediumLE(value: UInt)

Writes an unsigned medium in little endian.

Link copied to clipboard
open fun writeUnsignedShort(value: UShort)

Writes a UShort.

Link copied to clipboard
open fun writeUnsignedShortLE(value: UShort)

Writes a UShort in little endian.

Link copied to clipboard
open fun writeUnsignedVarInt(value: UInt)

Writes a UInt in a variable length format.

Link copied to clipboard
open fun writeUnsignedVarLong(value: ULong)

Writes a ULong in a variable length format.

Link copied to clipboard
open fun writeUUID(value: UUID)

Writes a UUID.

Link copied to clipboard
open fun writeVarInt(value: Int)

Writes an Int in a variable length format.

Link copied to clipboard
open fun writeVarLong(value: Long)

Writes a Long in a variable length format.

Link copied to clipboard
open fun writeZero(length: Int)

Writes length amount of null bytes.