Take the binary message 06C785969987850400000012 for example.
It is an array of bytes:
▪ The 06 is a length indicator indicating that the following 6 bytes C78596998785 should be recognized as a field. The legacy application parses it into a String, and the encoding is cp937.
▪ C78596998785 is the binary representation of the String "George".
▪ Byte 04 is also a length indicator, indicating that the following 4 bytes 00000012 should be recognized as a field. In this case, the legacy application parses it into an integer.
▪ 00000012 is the binary representation of integer "18".
The binary message is a data object with two fields: the first one is String and the second field is an integer.
Example
This example defines a JavaBean to hold data in Java world:
public class Person { private String name; private int age; public int getAge() { return age; } public void setAge(int age) { this.age = age; } public String getName() { return name; } public void setName(String name) { this.name = name; } }