setBytes method
Writes the content of bytes
at index
(inclusive).
Exceptions:
-
WriteIndexOutOfRangeException if the current writer index is outside of the bounds of the buffer.
-
BufferOverflowException if the length of the resulting bytes would overflow the buffer.
Implementation
void setBytes(int index, List<int> bytes) {
assertWriteable(index, bytes.length);
for (var i = 0; i < bytes.length; i++) {
updateByte(index + i, bytes[i]);
}
}