camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pratik Thacker <pratik.thack...@gmail.com>
Subject Binary Data Structure Marshalling and Unmarshalling
Date Wed, 17 Aug 2016 11:41:19 GMT
We need to decode and encode binary data structure.
We explored several data formats available in
http://camel.apache.org/data-format.html. But couldn't find relevant data
format for binary structured record.

For example:
If my data structure of a record is like:
SampleStructure bytes(12){
       int num1: bytes(1);
       int num2: bytes(2);
       string results: bytes(9);
}
And Data is like:
Record-1{
      num1: 100;
      num2: 300;
      results: "Test_Test";
}
For above sample data, file would be of 12 bytes containing one record.
* 1st byte representing byte form of integer 100.
* 2nd and 3rd byte representing byte form of integer 300. Here, it would be
great if we have choice to choose among big-endian and little-endian format.
* next 9 bytes representing byte form of ascii value of each character of
the string "Test_Test".

Similarly a file can contain multiple consecutive records.

Please suggest if we can unmarshal such formats and directly get a POJO
object, just like we get it for the csv, xml or flat file formats. Here are
the references we already explored and found it to be non-relevant for our
case.
   1. Bindy : http://camel.apache.org/bindy.html
   2. Bean IO: http://camel.apache.org/beanio.html
   3. Flatpack : http://camel.apache.org/flatpack-dataformat.html



--
View this message in context: http://camel.465427.n5.nabble.com/Binary-Data-Structure-Marshalling-and-Unmarshalling-tp5786529.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message