You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by jayram7 <ja...@hotmail.com> on 2015/03/24 23:04:55 UTC

Write Collection of FixedLengthRecord to Flat File

Hi, 

I have a List with the POJO annotated with @FixedLengthRecord

and I am using

<bindy id="bindyFixedLengthFormat" type="Fixed" packages="xx">
But I am not able to write all the data to a flat file. 
I know that the csv format works in this case.



--
View this message in context: http://camel.465427.n5.nabble.com/Write-Collection-of-FixedLengthRecord-to-Flat-File-tp5764720.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Write Collection of FixedLengthRecord to Flat File

Posted by jayram7 <ja...@hotmail.com>.
I think I got a solution for this. I explicitly created a List of Map and
then marshalling it

List<Map&lt;String, Object>> pojoListMap = new ArrayList<Map&lt;String,
Object>>();
        Map<String, Object> pojoMap = null;
        for(POJO pojo : pojoList) {
            pojoMap = new HashMap<String, Object>(); 
            pojoMap.put(pojo.getClass().getName(), pojo);
            pojoListMap.add(pracMap);
        }



--
View this message in context: http://camel.465427.n5.nabble.com/Write-Collection-of-FixedLengthRecord-to-Flat-File-tp5764720p5764786.html
Sent from the Camel - Users mailing list archive at Nabble.com.