Unmarshal fixed lenght Binary data format using Bindy
Hi, I have a fixed length Binary data in Bit pack format. Can I use the Bindy DataFormat to unmarshal the binary data? I looked at the details of the Bindy DataFormat. It provides the ability where using the Annotations the user can map the data model to POJO. This way user has to only define the data model in form of Annotations and Bindy Data Format in Apache Camel will unmarshal the data from file into the Object form. Thus wanted to know if Bindy DataFormat can be used to unmarshal the binary data If not Bindy then which DataFormat can I use to unmarshal the binary data where I will only need to define the data model and Camel will unmarshal the data from file to Object. Regards, Kaustubh Kane -- View this message in context: http://camel.465427.n5.nabble.com/Unmarshal-fixed-lenght-Binary-data-format-using-Bindy-tp5785226.html Sent from the Camel - Users mailing list archive at Nabble.com.
Unmarshal fixed length Binary data
Hi, We have a fixed length Binary data. I am looking at the Bindy Data Format and found that it supports unmarshalling of Fixed Length records. I looked at the implementation/code of this Bindy Fixed Lenght records in the Camel Source code (BindyFixedLengthDataFormat.java and BindyFixedLengthFactory.java) I looked at the function createModel in BindyFixedLengthDataFormat.java and found that it assumes one record equivalent to one line (i.e. each record will be in a separate line). Which means at the completion of record there will be a newline character in the file so that next record starts from a new line. For this reason, it seems to me that Bindy Data Format will not be able to unmarshal fixed lenght binary data. In Binary mode files there are no lines and rows. You don't read in lines in case of binary data/files. That only works with text files. Could someone please provide details on what Data Format can be used to unmarshal Fixed lenght binary data?? I am looking at an appropriate data format to which I can provide a model and using that model it will read the data and create a POJO for me. Just like what Bindy does. Regards, Kaustubh Kane -- View this message in context: http://camel.465427.n5.nabble.com/Unmarshal-fixed-length-Binary-data-tp5787125.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Unmarshal fixed length Binary data
Thanks for all your responses. I am looking at the BeanIO data format and will get back on this in a day or two. -- View this message in context: http://camel.465427.n5.nabble.com/Unmarshal-fixed-length-Binary-data-tp5787125p5787306.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Unmarshal fixed length Binary data
Hello, I will need to write my own DataFormat. I am trying to understand what all will be needed. Can I re-use anything within existing DataFormats functionality which Camel provide. Following are the main areas to be covered for the new DataFormat. 1) Marshal and unmarshal the binary data from text file to/from POJO 2) Making it model driven by being able to provide the data model in form of Java annotations which the Camel framework will load to marshal and unmarshal the data. Both of the above areas are covered in the existing DataFormats provided out of the box by Camel. Will I be able to re-use anything for my custom data format ?? Could you please provide brief details on what all you had to do to create a Custom DataFormat. -- View this message in context: http://camel.465427.n5.nabble.com/Unmarshal-fixed-length-Binary-data-tp5787125p5787406.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Unmarshal fixed length Binary data
Could someone please guide me on creating a custom DataFormat. Please refer to details in my previous post above. -- View this message in context: http://camel.465427.n5.nabble.com/Unmarshal-fixed-length-Binary-data-tp5787125p5787592.html Sent from the Camel - Users mailing list archive at Nabble.com.