@Override public int read() throws IOException {
synchronized (lock) {
    checkNotClosed();
    if (pos == count) {
      return -1;
    }
    return buf[pos++];
  }
}

@ Override public int read ( ) throws IOException { synchronized ( lock ) { checkNotClosed ( ) ; if ( pos == count ) { return - 1 ; } return buf [ pos ++ ] ; } }
reads a single character from this reader and returns it as an integer with the two higher - order bytes set to 0 . returns - 1 if no more characters are available from this reader .
