writeFrom method

int writeFrom(
  1. BytesBuffer src, [
  2. int? length
])

Writes length bytes from src.

Implementation

int writeFrom(BytesBuffer src, [int? length]) {
  length ??= src.remaining;
  final pos = bytesIO.position;
  bytesIO.ensureCapacity(pos + length);
  return bytesIO.writeFrom(src.bytesIO, length);
}