assertEndOfDataReached method
Asserts if the end of data is reached or not
If the end of data is not reached, it throws an exception.
Implementation
void assertEndOfDataReached([String message = '']) {
if (hasBytes()) {
throw Exception(
'End of data not reached. There are $remainingLength bytes left to be processed.$message');
}
}