checkBytesAvailable method

void checkBytesAvailable(
  1. int number
)

Implementation

void checkBytesAvailable(int number) {
  if (number > unreadLength) {
    throw "There is not enough $number bytes in stream";
  }
}