@Override public boolean ready() throws IOException {
synchronized (lock) {
    checkNotClosed();
    return ((end - pos) > 0) || in.ready();
  }
}

@ Override public boolean ready ( ) throws IOException { synchronized ( lock ) { checkNotClosed ( ) ; return ( ( end - pos ) > 0 ) || in . ready ( ) ; } }
indicates whether this reader is ready to be read without blocking .
