camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Müller <christian.muel...@gmail.com>
Subject Re: Getting rid of line separator [ BeanIO + Camel ]
Date Mon, 21 Oct 2013 17:53:31 GMT
You should be able to configure it [1] [2], see the "recordTerminator"
property.

[1] http://beanio.org/2.0/docs/reference/#TheMappingFile
[2] http://beanio.org/2.0/docs/reference/#CSVStreamFormat

Best,

Christian
-----------------

Software Integration Specialist

Apache Member
V.P. Apache Camel | Apache Camel PMC Member | Apache Camel committer
Apache Incubator PMC Member

https://www.linkedin.com/pub/christian-mueller/11/551/642


On Mon, Oct 21, 2013 at 5:47 AM, Rachit Gandhi <rachit.gandhi@gmail.com>wrote:

> I looked at the junit for beanio .
>
>
> https://svn.apache.org/repos/asf/camel/trunk/components/camel-beanio/src/test/java/org/apache/camel/dataformat/beanio/BeanIODataFormatComplexTest.java
>
> If I change the marshal route to write it to the file...and run the unit
> test . .it produces the file with a line separator.
>
> I am trying to produce the file without the line separator.
>
> Does anyone have any ideas?
> On Oct 19, 2013 3:19 AM, "Claus Ibsen" <claus.ibsen@gmail.com> wrote:
>
> > Hi
> >
> > I suggest to check the beanio documentation if you can configure the
> > line feed to use. Maybe there is unix vs windows style you can set
> > etc. Or a way to configure it.
> >
> > Looking in the source code of camel-beanio does not indicate we use a
> > fixed line feed or anything. See the
> > org.apache.camel.dataformat.beanio.BeanIODataFormat
> >
> > On Fri, Oct 18, 2013 at 9:31 PM, nanotech <rachit.gandhi@gmail.com>
> wrote:
> > > I am using BeanIO (fixedlength format ) and Camel..
> > >
> > > As a POC, I am trying to write the data from Java object to a file
> using
> > a
> > > route.
> > >
> > > Everything works fine but it puts an extra line separator (LS) at the
> > end of
> > > record.
> > >
> > > Is there a way to suppress this behavior ?
> > >
> > > Here is how the Route looks like.
> > >                 from("direct:marshal")
> > >                 .marshal(format)
> > >                 .to("file://output?fileName=output.txt");
> > >
> > >
> > > Thanks,
> > > RG
> > >
> > >
> > >
> > > --
> > > View this message in context:
> >
> http://camel.465427.n5.nabble.com/Getting-rid-of-line-separator-BeanIO-Camel-tp5741859.html
> > > Sent from the Camel - Users mailing list archive at Nabble.com.
> >
> >
> >
> > --
> > Claus Ibsen
> > -----------------
> > Red Hat, Inc.
> > Email: cibsen@redhat.com
> > Twitter: davsclaus
> > Blog: http://davsclaus.com
> > Author of Camel in Action: http://www.manning.com/ibsen
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message