resetWrite method
Reset the write offsets in the buffer.
If hard
is true, reset the _recordedWriteCount
accumulator.
If hard
is false (default), add the current writeCount to the
_recordedWriteCount
.
Implementation
void resetWrite({bool hard = false}) {
_recordedWriteCount = hard ? 0 : _recordedWriteCount + writeCount;
writeCount = 0;
}