read method

Future<int> read()

Returns the next unsigned byte, or -1 on EOF

Implementation

Future<int> read() async {
  if (await isEOF()) {
    return -1;
  } else {
    return _curr![_pos++];
  }
}