private void waitUntilReadable() throws IOException {
  readTimeout.enter();
  try {
    while (readBuffer.size() == 0 && !finished && !closed && errorCode == null) {
      waitForIo();
    }
  }
  finally {
    readTimeout.exitAndThrowIfTimedOut();
  }
}

private void waitUntilReadable ( ) throws IOException { readTimeout . enter ( ) ; try { while ( readBuffer . size ( ) == 0 && ! finished && ! closed && errorCode == null ) { waitForIo ( ) ; } } finally { readTimeout . exitAndThrowIfTimedOut ( ) ; } }
returns once the source is either readable or finished .
