0

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.

Jayram Rout
  • 57
  • 1
  • 2
  • 8

1 Answers1

0

I think I got a solution for this. I explicitly created a List of Map and then marshalling it

List<Map<String, Object>> pojoListMap = new ArrayList<Map<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);
        }
Jayram Rout
  • 57
  • 1
  • 2
  • 8