rd-framework / com.jetbrains.rd.framework / UnsafeBuffer

UnsafeBuffer

class UnsafeBuffer : AbstractBuffer, Closeable

Constructors

<init>

UnsafeBuffer(initialSize: Long)
UnsafeBuffer(byteArray: ByteArray)

Properties

allocated

val allocated: Int

position

var position: Int

Functions

checkAvailable

fun checkAvailable(moreSize: Int): Unit

close

fun close(): Unit

finalize

fun finalize(): Unit

getArray

fun getArray(): ByteArray

readBoolean

fun readBoolean(): Boolean

readBooleanArray

fun readBooleanArray(): BooleanArray

readByte

fun readByte(): Byte

readByteArray

fun readByteArray(): ByteArray

readByteArrayRaw

fun readByteArrayRaw(array: ByteArray): Unit

readChar

fun readChar(): Char

readCharArray

fun readCharArray(): CharArray

readDouble

fun readDouble(): Double

readDoubleArray

fun readDoubleArray(): DoubleArray

readFloat

fun readFloat(): Float

readFloatArray

fun readFloatArray(): FloatArray

readInt

fun readInt(): Int

readIntArray

fun readIntArray(): IntArray

readLong

fun readLong(): Long

readLongArray

fun readLongArray(): LongArray

readNullableString

fun readNullableString(): String?

readShort

fun readShort(): Short

readShortArray

fun readShortArray(): ShortArray

reset

fun reset(): Unit

Sets position to zero, can discard data in order to shrink backing storage

writeBoolean

fun writeBoolean(value: Boolean): Unit

writeBooleanArray

fun writeBooleanArray(array: BooleanArray): Unit

writeByte

fun writeByte(value: Byte): Unit

writeByteArray

fun writeByteArray(array: ByteArray): Unit

writeByteArrayRaw

fun writeByteArrayRaw(array: ByteArray, count: Int?): Unit

writeChar

fun writeChar(value: Char): Unit

writeCharArray

fun writeCharArray(array: CharArray): Unit

writeDouble

fun writeDouble(value: Double): Unit

writeDoubleArray

fun writeDoubleArray(array: DoubleArray): Unit

writeFloat

fun writeFloat(value: Float): Unit

writeFloatArray

fun writeFloatArray(array: FloatArray): Unit

writeInt

fun writeInt(value: Int): Unit

writeIntArray

fun writeIntArray(array: IntArray): Unit

writeLong

fun writeLong(value: Long): Unit

writeLongArray

fun writeLongArray(array: LongArray): Unit

writeNullableString

fun writeNullableString(value: String?): Unit

writeShort

fun writeShort(value: Short): Unit

writeShortArray

fun writeShortArray(array: ShortArray): Unit

Inherited Functions

readString

fun readString(): String

readUByte

open fun readUByte(): <ERROR CLASS>

readUByteArray

open fun readUByteArray(): <ERROR CLASS>

readUInt

open fun readUInt(): <ERROR CLASS>

readUIntArray

open fun readUIntArray(): <ERROR CLASS>

readULong

open fun readULong(): <ERROR CLASS>

readULongArray

open fun readULongArray(): <ERROR CLASS>

readUShort

open fun readUShort(): <ERROR CLASS>

readUShortArray

open fun readUShortArray(): <ERROR CLASS>

rewind

fun rewind(): Unit

Sets position to zero, keeps all data

writeString

fun writeString(value: String): Unit

writeUByte

open fun writeUByte(value: <ERROR CLASS>): Unit

writeUByteArray

open fun writeUByteArray(array: <ERROR CLASS>): Unit

writeUInt

open fun writeUInt(value: <ERROR CLASS>): Unit

writeUIntArray

open fun writeUIntArray(array: <ERROR CLASS>): Unit

writeULong

open fun writeULong(value: <ERROR CLASS>): Unit

writeULongArray

open fun writeULongArray(array: <ERROR CLASS>): Unit

writeUShort

open fun writeUShort(value: <ERROR CLASS>): Unit

writeUShortArray

open fun writeUShortArray(array: <ERROR CLASS>): Unit

Extension Functions

deepClonePolymorphic

fun <T> T.deepClonePolymorphic(): T

readArray

fun <T> AbstractBuffer.readArray(inner: () -> T): Array<T>

readBool

fun AbstractBuffer.readBool(): Boolean

readDateTime

fun AbstractBuffer.readDateTime(): <ERROR CLASS>

readEnum

fun <T : Enum<T>> AbstractBuffer.readEnum(): T

readEnumSet

fun <T : Enum<T>> AbstractBuffer.readEnumSet(): <ERROR CLASS><T>

readGuid

fun AbstractBuffer.readGuid(): <ERROR CLASS>

readInternId

fun AbstractBuffer.readInternId(): InternId

readList

fun <T> AbstractBuffer.readList(inner: () -> T): List<T>

readNullable

fun <T : Any> AbstractBuffer.readNullable(inner: () -> T): T?

readRdId

fun AbstractBuffer.readRdId(): RdId

readSecureString

fun AbstractBuffer.readSecureString(): RdSecureString

readUri

fun AbstractBuffer.readUri(): <ERROR CLASS>

readUuid

fun AbstractBuffer.readUuid(): <ERROR CLASS>

readVoid

fun AbstractBuffer.readVoid(): Unit

writeArray

fun <T> AbstractBuffer.writeArray(value: Array<T>, elemWriter: (T) -> Unit): Unit

writeBool

fun AbstractBuffer.writeBool(value: Boolean): Unit

writeDateTime

fun AbstractBuffer.writeDateTime(value: <ERROR CLASS>): Unit

writeEnum

fun <T : Enum<T>> AbstractBuffer.writeEnum(value: Enum<T>): Unit

writeEnumSet

fun <T : Enum<T>> AbstractBuffer.writeEnumSet(set: <ERROR CLASS><T>): Unit

writeGuid

fun AbstractBuffer.writeGuid(value: <ERROR CLASS>): Unit

writeInternId

fun AbstractBuffer.writeInternId(id: InternId): Unit

writeList

fun <T> AbstractBuffer.writeList(value: List<T>, elemWriter: (T) -> Unit): Unit

writeNullable

fun <T : Any> AbstractBuffer.writeNullable(value: T?, elemWriter: (T) -> Unit): Unit

writeRdId

fun AbstractBuffer.writeRdId(value: RdId): Unit

writeSecureString

fun AbstractBuffer.writeSecureString(string: RdSecureString): Unit

writeUri

fun AbstractBuffer.writeUri(value: <ERROR CLASS>): Unit

writeUuid

fun AbstractBuffer.writeUuid(value: <ERROR CLASS>): Unit

writeVoid

fun AbstractBuffer.writeVoid(void: Unit): Unit