readByte method

int readByte()

Reads a signed byte. Returns an int between -128 and 127, inclusive. See also readUnsignedByte.

Throws EOFException if EOF is reached before the needed byte is read.

Implementation

int readByte() {
  if (seek + 1 > _source.lengthInBytes) {
    throw EOFException('Attempt to read beyond end of input');
  } else {
    final b = _asByteData.getInt8(seek);
    seek += 1;
    return b;
  }
}