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

tallison pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tika.git


The following commit(s) were added to refs/heads/main by this push:
     new b072e5b11 TIKA-4403 -- implement transferTo
b072e5b11 is described below

commit b072e5b11855e582dd0de9db73c103f3c5d24c91
Author: tallison <[email protected]>
AuthorDate: Wed Apr 9 16:07:11 2025 -0400

    TIKA-4403 -- implement transferTo
---
 tika-core/src/main/java/org/apache/tika/io/BoundedInputStream.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tika-core/src/main/java/org/apache/tika/io/BoundedInputStream.java 
b/tika-core/src/main/java/org/apache/tika/io/BoundedInputStream.java
index 31290cc1a..7515761a2 100644
--- a/tika-core/src/main/java/org/apache/tika/io/BoundedInputStream.java
+++ b/tika-core/src/main/java/org/apache/tika/io/BoundedInputStream.java
@@ -20,6 +20,8 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 
+import org.apache.commons.io.IOUtils;
+
 /**
  * Very slight modification of Commons' BoundedInputStream
  * so that we can figure out if this hit the bound or not.
@@ -145,7 +147,7 @@ public class BoundedInputStream extends InputStream {
 
     @Override
     public long transferTo(OutputStream out) throws IOException {
-        return in.transferTo(out);
+        return IOUtils.copy(this, out);
     }
 
     public long getPos() {

Reply via email to