Oracle Community Directory
Oracle Community FAQ
My Oracle Support Community (MOSC)
Go Directly To
Oracle Technology Network Community
My Oracle Support Community
OPN Cloud Connection
Oracle Employee Community
Oracle User Group Community
Conventional & Interruptable IO [ARCHIVE]
Please enter a title.
You can not post a blank message. Please type your message and try again.
This discussion is archived
: Sep 30, 2010 3:19 AM by
reading inputstream from the exec process
Sep 30, 2010 3:15 AM
I am trying to read a 7zip compressed file in Java. No InputStreamer exists for 7zip compression, so I read it using Process.exec:
Process proc = shell.exec("7z x very_big_file.7z -so ");
BufferedReader br = new BufferedReader(new InputStreamReader(proc.getInputStream()));
Question: if I drop the sleep command above, the buffer is not ready, and I do not get any strings from the executed process. How can I force the reader to check wheather EOF is reached, and not wheather the the buffer is ready?
This content has been marked as final.
Show 1 reply
Re: reading inputstream from the exec process
Sep 30, 2010 3:19 AM
in response to
Get rid of the sleep and the ready() test. Just read until readLine() returns null.