maxxedev commented on code in PR #447:
URL: https://github.com/apache/commons-io/pull/447#discussion_r1163450815


##########
src/main/java/org/apache/commons/io/input/QueueInputStream.java:
##########
@@ -86,12 +99,24 @@ public QueueOutputStream newQueueOutputStream() {
     }
 
     /**
-     * Reads and returns a single byte.
+     * Reads and returns a single byte. In blocking read mode, the method will 
wait if necessary until a queue element
+     * becomes available. In non-blocking read mode, the method will return -1 
immediately if the queue is empty.
      *
      * @return either the byte read or {@code -1} if the end of the stream has 
been reached
+     * @throws InterruptedIOException if the thread is interrupted while 
reading from the queue.
      */
     @Override
-    public int read() {
+    public int read() throws InterruptedIOException {

Review Comment:
   Good point. I created a subclass.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to