MutableData class

Mutable concurrently accessible data buffer.

Could be accessed from several workers simultaneously.

Constructors

MutableData([Int _capacity = 16])

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size Int
Current data size, may concurrently change later on.
no setter

Methods

appendByteArray(ByteArray data, {Int fromIndex = 0, Int toIndex = 16}) → void
Appends byte array to the buffer.
appendCData(COpaquePointer? data, Int count) → void
Appends C data to the buffer, if data is null or count is non-positive - return.
appendData(MutableData data) → void
Appends data to the buffer.
copyInto({required ByteArray output, required Int destinationIndex, required Int startIndex, required Int endIndex}) → void
Copies range of mutable data to the byte array.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reset() → void
Reset the data buffer, makings its size 0.
toString() String
A string representation of this object.
inherited
withBufferLocked<R>(R block(ByteArray array, Int dataSize)) → R
Executes provided block under lock with the raw data buffer.
withPointerLocked<R>(R block(COpaquePointer, Int dataSize)) → R
Executes provided block under lock with raw pointer to the data stored in the buffer.

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](Int index) Byte
Get a byte from the mutable data.