It works for me on OSX. You may have to use '\r\n' if your OS in Windows...
And by the way, you know you can use
System.getProperty("line.separator");...

Best,
Christian

On Thu, Jul 5, 2012 at 4:42 PM, dmhatre <darpan27...@gmail.com> wrote:

> Hi Folks,
>    Need help adding newline while writing to the file.
> I am writing very large file using Apache Camel's File Component.
> I am using StringBuffer to store very large string and then passing
> (passing
> string ex.getIn().setBody(stringbuffer.toString()); )  it to the
> file endpoint (<to uri="file:c://cameldata/loanet/outbound"/>)
> This works fine and the file is created. But when I append "\n" newline
> character
> the newline character is displayed as it is in notepad and other editors.
> Is it possible to print the data in next line instead?
>
> for(int i=0;i<=10;i++){
>     stringbuffer.append("some records \n");
> }
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Help-with-newline-while-writing-to-the-file-tp5715554.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Reply via email to