This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-io.git


The following commit(s) were added to refs/heads/master by this push:
     new 83f63d8fb Javadoc
83f63d8fb is described below

commit 83f63d8fbeb386e10409b976025a516c15586f21
Author: Gary Gregory <[email protected]>
AuthorDate: Mon Sep 22 10:23:14 2025 -0400

    Javadoc
---
 .../java/org/apache/commons/io/input/BoundedInputStream.java     | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/main/java/org/apache/commons/io/input/BoundedInputStream.java 
b/src/main/java/org/apache/commons/io/input/BoundedInputStream.java
index 0d34a6052..d55f36783 100644
--- a/src/main/java/org/apache/commons/io/input/BoundedInputStream.java
+++ b/src/main/java/org/apache/commons/io/input/BoundedInputStream.java
@@ -573,6 +573,15 @@ public synchronized long skip(final long n) throws 
IOException {
         return skip;
     }
 
+    /**
+     * Converts a request to read {@code len} bytes to a lower count if 
reading would put us over the limit.
+     * <p>
+     * If a {@code maxCount} is not set, then return max{@code maxCount}.
+     * </p>
+     *
+     * @param len The requested byte count.
+     * @return How many bytes to actually attempt to read.
+     */
     private long toReadLen(final long len) {
         return maxCount >= 0 ? Math.min(len, maxCount - getCount()) : len;
     }

Reply via email to