write method

  1. @override
int write(
  1. List<int> list, [
  2. int offset = 0,
  3. int? length
])
override

Writes the int at list as bytes, respecting offset and length parameters.

Implementation

@override
int write(List<int> list, [int offset = 0, int? length]) {
  length ??= list.length - offset;

  if (length <= 0) return 0;

  final pos = _position;
  ensureCapacity(pos + length);

  _ioSyncPosition();
  _ioWriteBytes(list, offset, length);
  incrementPosition(length);
  assert(_position == _ioPosition);

  return length;
}