writeBytes method

BcsWriter writeBytes(
  1. Uint8List bytes
)

Write a raw byte array into the buffer and shift the cursor by its length.

Implementation

BcsWriter writeBytes(Uint8List bytes) {
  ensureSizeOrGrow(bytes.length);
  for (var i = 0; i < bytes.length; i++) {
    _dataView.setUint8(_bytePosition + i, bytes[i]);
  }
  return shift(bytes.length);
}