Why might BufferedReader fail running an external app?

I have a Process p that runs an external program with BufferedReaders attached to p.getInputStream and p.getErrorStream. The external app (PostgreSQL pg_dump) outputs a password prompt (Password: ) without a carriage return on stderr. This works fine from the Windows command line. In the Java app, the BufferedReaders wait for ready() = 'true' and then are read character-by-character. However, neither stdout or stderr is ever ready() = 'true' and when I exit, the code throws an exception that the Process hadn't terminated. The small app that I wrote tries the read three times, with short timeouts in between. It works with ipconfig and all the PostgreSQL utilities except those that write error messages or a prompt. If it shows up on the screen when the utility is run from the command line, why not in the Java app?

[835 byte] By [Michael.Schmidta] at [2007-11-26 15:59:07]
# 1
Don't use ready(). Just call a variant of read() - it will block until data is ready.
dannyyatesa at 2007-7-8 22:20:19 > top of Java-index,Core,Core APIs...
# 2
I would use an InputStream rather than a Reader in this situation unless you know that Postgres is writing Unicode.
ejpa at 2007-7-8 22:20:19 > top of Java-index,Core,Core APIs...