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

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


The following commit(s) were added to refs/heads/main by this push:
     new 1c73c49e82d CAMEL-18124: camel-stream - Add readLine option to control 
read mode
1c73c49e82d is described below

commit 1c73c49e82d7811a60009859a2bd2eb6dd94768f
Author: Claus Ibsen <[email protected]>
AuthorDate: Wed May 18 19:19:52 2022 +0200

    CAMEL-18124: camel-stream - Add readLine option to control read mode
---
 docs/user-manual/modules/ROOT/pages/camel-jbang.adoc | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)

diff --git a/docs/user-manual/modules/ROOT/pages/camel-jbang.adoc 
b/docs/user-manual/modules/ROOT/pages/camel-jbang.adoc
index 16218e4d32e..98c2d750101 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-jbang.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-jbang.adoc
@@ -292,6 +292,10 @@ camel run clipboard.xml
 
 You can also execute a Camel JBang file as a script that can be used for 
terminal scripting with pipes and filters.
 
+NOTE: Every time the script is executed a JVM is started with Camel. This is 
not very fast or low on memory usage,
+so use Camel JBang terminal scripting where using Camel makes sense. For 
example to use the
+many Camel components or Kamelets to more easily send or receive data from 
disparate IT systems.
+
 This requires to add the following line in top of the file, for example as in 
the `upper.yaml` file below:
 
 [source,text]
@@ -337,9 +341,18 @@ The name of the logging file cannot be configured.
 echo "Hello\nWorld" | ./upper.yaml --logging=true
 ----
 
-NOTE: Every time the script is executed a JVM is started with Camel. This is 
not very fast or low on memory usage,
-so use Camel JBang terminal scripting where using Camel makes sense. For 
example to use the
-many Camel components or Kamelets to more easily send or receive data from 
disparate IT systems.
+==== Using stream:in with line vs raw mode
+
+When using `stream:in` to read data from _System in_ then the 
xref:components::stream-component.adoc[Stream component]
+works in two modes:
+
+- line mode (default) - reads input as single lines (separated by line breaks).
+  Message body is a `String`.
+- raw mode - reads the entire stream until _end of stream_.
+  Mmessage body is a `byte[]`.
+
+The default mode is due to historically how the stream component as created.
+Therefore, you may want to set `stream:in?readLine=false` to use raw mode.
 
 === Running local Kamelets
 

Reply via email to