Re: How to append text to the beginning of the file using Camel

2017-04-05 Thread Amruta Jawlekar
Thank you souciance. Enrich best suits my requirement and it worked! :) -- View this message in context: http://camel.465427.n5.nabble.com/How-to-append-text-to-the-beginning-of-the-file-using-Camel-tp5796906p5797015.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to append text to the beginning of the file using Camel

2017-04-04 Thread souciance
You could perhaps PollEnrich to fetch the data from the file then then simply concatenate the new portion to the file data and then write to the same file again. But its easier to write some bean method to do this. On Tue, Apr 4, 2017 at 2:11 PM, Amruta Jawlekar [via Camel] <

Re: How to append text to the beginning of the file using Camel

2017-04-04 Thread Amruta Jawlekar
Thanks Claus for your prompt response :) -- View this message in context: http://camel.465427.n5.nabble.com/How-to-append-text-to-the-beginning-of-the-file-using-Camel-tp5796906p5796909.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to append text to the beginning of the file using Camel

2017-04-04 Thread Claus Ibsen
Hi Yeah write your own java class / method that appends to the start of the file. There is no such functionality out of the box, as fileExists=Append appends at the end On Tue, Apr 4, 2017 at 1:12 PM, Amruta Jawlekar wrote: > Hi All, > > I need to append text like XML

How to append text to the beginning of the file using Camel

2017-04-04 Thread Amruta Jawlekar
Hi All, I need to append text like XML Header tag in the beginning of a file. I know one way to achieve it - 1. Create a String/StringBuilder/List having header tag. 2. Unmarshal the file contents and convert inputstream to List/String or any suitable object 3. Append the existing contents to