ppkarwasz commented on code in PR #776:
URL: https://github.com/apache/commons-io/pull/776#discussion_r2326572400


##########
src/main/java/org/apache/commons/io/IOUtils.java:
##########
@@ -2637,57 +2638,61 @@ public static BufferedReader toBufferedReader(final 
Reader reader, final int siz
     }
 
     /**
-     * Gets the contents of an {@link InputStream} as a {@code byte[]}.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a 
{@link BufferedInputStream}.
-     * </p>
+     * Reads all remaining bytes from the given {@link InputStream} into a new 
{@code byte[]}.
      *
-     * @param inputStream the {@link InputStream} to read.
-     * @return the requested byte array.
-     * @throws NullPointerException if the InputStream is {@code null}.
-     * @throws IOException          if an I/O error occurs or reading more 
than {@link Integer#MAX_VALUE} occurs.
+     * <p>The method accumulates the data in temporary buffers and returns a 
single array
+     * containing the entire contents once the end of the stream is 
reached.</p>
+     *
+     * @param input the {@link InputStream} to read; must not be {@code null}.
+     * @return a new byte array.
+     * @throws IllegalArgumentException if the size of the stream is greater 
than {@code Integer.MAX_VALUE}.
+     * @throws IOException          if an I/O error occurs while reading.
+     * @throws NullPointerException if {@code input} is {@code null}.
      */
-    public static byte[] toByteArray(final InputStream inputStream) throws 
IOException {
+    public static byte[] toByteArray(final InputStream input) throws 
IOException {

Review Comment:
   Fixed in 
https://github.com/apache/commons-io/pull/776/commits/9439095923e901ef3e4eac9ae4f06c00268a280c



-- 
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: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to