You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2025/07/02 06:07:28 UTC
(camel) 02/04: CAMEL-22208 Optimize CachedOutputStream.pageToFileStream for large streams
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch camel-4.10.x
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 14ee84d7a9e2aa009f2efc8f409c9731e176e592
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed Jul 2 07:26:27 2025 +0200
CAMEL-22208 Optimize CachedOutputStream.pageToFileStream for large streams
---
.../camel/converter/stream/CachedOutputStream.java | 2 +-
.../main/java/org/apache/camel/util/IOHelper.java | 22 +++++++++++-----------
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/core/camel-support/src/main/java/org/apache/camel/converter/stream/CachedOutputStream.java b/core/camel-support/src/main/java/org/apache/camel/converter/stream/CachedOutputStream.java
index 52fc62eeb82..3a160d49c60 100644
--- a/core/camel-support/src/main/java/org/apache/camel/converter/stream/CachedOutputStream.java
+++ b/core/camel-support/src/main/java/org/apache/camel/converter/stream/CachedOutputStream.java
@@ -166,7 +166,7 @@ public class CachedOutputStream extends OutputStream {
inMemory = false;
}
}
-
+
public int getStrategyBufferSize() {
return strategy.getBufferSize();
}
diff --git a/core/camel-util/src/main/java/org/apache/camel/util/IOHelper.java b/core/camel-util/src/main/java/org/apache/camel/util/IOHelper.java
index f5937145833..58e2f74a339 100644
--- a/core/camel-util/src/main/java/org/apache/camel/util/IOHelper.java
+++ b/core/camel-util/src/main/java/org/apache/camel/util/IOHelper.java
@@ -171,11 +171,11 @@ public final class IOHelper {
* Copies the data from the input stream to the output stream. Uses the legacy copy logic. Prefer using
* {@link IOHelper#copy(InputStream, OutputStream)} unless you have to control how data is flushed the buffer
*
- * @param input the input stream buffer
- * @param output the output stream buffer
- * @param bufferSize the size of the buffer used for the copies
- * @return the number of bytes copied
- * @throws IOException for I/O errors
+ * @param input the input stream buffer
+ * @param output the output stream buffer
+ * @param bufferSize the size of the buffer used for the copies
+ * @return the number of bytes copied
+ * @throws IOException for I/O errors
*/
public static int copy(final InputStream input, final OutputStream output, int bufferSize) throws IOException {
return copy(input, output, bufferSize, false);
@@ -201,12 +201,12 @@ public final class IOHelper {
* Copies the data from the input stream to the output stream. Uses the legacy copy logic. Prefer using
* {@link IOHelper#copy(InputStream, OutputStream)} unless you have to control how data is flushed the buffer
*
- * @param input the input stream buffer
- * @param output the output stream buffer
- * @param bufferSize the size of the buffer used for the copies
- * @param flushOnEachWrite whether to flush the data everytime that data is written to the buffer
- * @return the number of bytes copied
- * @throws IOException for I/O errors
+ * @param input the input stream buffer
+ * @param output the output stream buffer
+ * @param bufferSize the size of the buffer used for the copies
+ * @param flushOnEachWrite whether to flush the data everytime that data is written to the buffer
+ * @return the number of bytes copied
+ * @throws IOException for I/O errors
*/
public static int copy(
final InputStream input, final OutputStream output, int bufferSize, boolean flushOnEachWrite,