Neuw84 commented on code in PR #7988:
URL: https://github.com/apache/iceberg/pull/7988#discussion_r1257903561


##########
aliyun/src/test/java/org/apache/iceberg/aliyun/oss/mock/AliyunOSSMockLocalController.java:
##########
@@ -276,4 +277,246 @@ public void setMessage(String message) {
       this.message = message;
     }
   }
+
+  /**
+   * Reads bytes up to a maximum length, if its count goes above that, it 
stops.
+   *
+   * <p>This is useful to wrap ServletInputStreams. The ServletInputStream 
will block if you try to
+   * read content from it that isn't there, because it doesn't know whether 
the content hasn't
+   * arrived yet or whether the content has finished. So, one of these, 
initialized with the
+   * Content-length sent in the ServletInputStream's header, will stop it 
blocking, providing it's
+   * been sent with a correct content length.
+   *
+   * <p>This code is borrowed from `org.apache.commons:commons-io`
+   */
+  public class BoundedInputStream extends FilterInputStream {

Review Comment:
   As it is test code that is not going to be shipped I just though that this 
was good enough. Open to suggestions here ( it is not very clear why the code 
is using `BoundedInputStream` and I did not wanted to mess with it. 
   
   Open to suggestions/guidance here.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to