diff options
Diffstat (limited to 'libjava/classpath/java/io/PipedInputStream.java')
-rw-r--r-- | libjava/classpath/java/io/PipedInputStream.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libjava/classpath/java/io/PipedInputStream.java b/libjava/classpath/java/io/PipedInputStream.java index 523ae2c70d3..c0396d206c6 100644 --- a/libjava/classpath/java/io/PipedInputStream.java +++ b/libjava/classpath/java/io/PipedInputStream.java @@ -279,6 +279,10 @@ public class PipedInputStream extends InputStream if (closed) throw new IOException ("Pipe closed"); + // Don't block if nothing was requested. + if (len == 0) + return 0; + // If the buffer is empty, wait until there is something in the pipe // to read. try |