clear method
void
clear()
Clears the underlying buffer
Implementation
void clear() {
if (_position != 0) {
throw StateError(
'MqttByteBuffer::clear - attempt to clear a byte buffer where postion is not zero, it is $_position');
}
buffer?.clear();
}