@Override public int read() throws IOException {
synchronized (lock) {
    checkNotClosed();
    if (pos < buf.length) {
      return buf[pos++];
    }
    return in.read();
  }
}

@ Override public int read ( ) throws IOException { synchronized ( lock ) { checkNotClosed ( ) ; if ( pos < buf . length ) { return buf [ pos ++ ] ; } return in . read ( ) ; } }
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 the end of the reader has been reached . if the pushback buffer does not contain any available characters then a character from the source reader is returned . blocks until one character has been read , the end of the source reader is detected or an exception is thrown .
