push method
Implementation
String? push(List<int> buffer) {
_bufferPool.addAll(buffer);
if (_bufferPool.length >= 4 && _dataLength == null) {
_dataLength = _byte4Int(_bufferPool.sublist(0, 4));
}
if (_dataLength != null && _bufferPool.length >= _dataLength! + 4) {
String? result;
if (_dataLength! > 0)
result = utf8.decode(_bufferPool.sublist(4, _dataLength! + 4));
_bufferPool.removeRange(0, _dataLength! + 4);
_dataLength = null;
return result;
}
return null;
}