DataBuffer

Storing data buffers.

Constructors

Link copied to clipboard
constructor()
constructor(address: Long)
constructor(byteArray: ByteArray)
constructor(size: Int)

Properties

Link copied to clipboard

Address of native referenced object. nullptr if not referencing any native allocated object. Note native allocation will happen only once.

Link copied to clipboard

Bytes buffer.

Link copied to clipboard

Check if data buffer is empty

Link copied to clipboard
val size: Int

Gets the size of the data buffer in bytes.

Functions

Link copied to clipboard
fun deflate(level: EArchiveLevel = EArchiveLevel.Balanced, method: EArchiveMethod = EArchiveMethod.Default): DataBuffer?

Deflate a source data buffer using the given method and level

Link copied to clipboard
fun finalize()

Overrides finalize that garbage collector will call when needed.

Link copied to clipboard
external fun fromStr(str: GemString)

Fill data buffer from input string

Link copied to clipboard
fun inflate(method: EArchiveMethod = EArchiveMethod.Default): DataBuffer?

Inflate a source data buffer using the given method and level

Link copied to clipboard

True if keeps a reference to a C++ SDK object False if keeps a C++ SDK object

Link copied to clipboard
operator fun not(): Boolean

Checks if this object is valid.

Link copied to clipboard
fun release()

Releases the native referenced value of this object if:

Link copied to clipboard
external fun reserve(size: Int): Int

Reserve data size

Link copied to clipboard
external fun toStr(): GemString?

String representation of the data buffer