writeBytes method
Writes the bytes
at the current writerIndex (inclusive)
and increments the writerIndex by the length of the added
bytes.
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
@override
void writeBytes(List<int> bytes) {
writeActiveBuffers();
var j = bytes.length;
ensureWritable(j);
assertWriteable(writerIndex, j);
file.setPositionSync(writerIndex);
file.writeFromSync(bytes);
writerIndex = writerIndex + j;
}