readByte method

int readByte([
  1. bool eofException = true
])

Returns the byte(-128 - 127) at offset. if eofException is false then if it reaches the end of the stream it will return -129. Otherwise it will throw an exception.

Implementation

int readByte([bool eofException = true]) {
  if (offset! < fileLength!) {
    return view.getInt8(_offset! + 1);
  } else if (eofException)
    throw RangeError("Reached end of file");
  else
    return -129;
}