According to the docs this method can return a '0' if the byte array is empty. This shouldn't happen if the InputStream is empty and the read method is blocking unless it times out, right? I can't seem to find anything in the docs about the method timing out. I'm waiting 2 seconds before a place several bytes into the pipe during this 2 seconds I'm seeing several zeros being returned by the method in a while loop.
Asked
Active
Viewed 133 times
0
-
post your code pls – marco Oct 09 '17 at 10:45
-
anyway, maybe this can help you https://stackoverflow.com/questions/804951/is-it-possible-to-read-from-a-inputstream-with-a-timeout – marco Oct 09 '17 at 10:46