This section describes how to convert an instance of Person into binary message. Following is the sample code:
public static void main(String[] args) throws Exception { InitManager.reset("jar:///format/config/abc.xml"); //Prepare person populate data into its fields Person person = new Person(); person.setName("George. Wilhelm. T"); person.setAge(57); //Get the defined format element by id "PersonFormat" FormatElement format = FormatFactory.getFormatElement("PersonFormat"); //Create a ReadAdapter for person ReadAdapter read = new JavaReadAdapter(person); //Perform unformat action Message msg = format.format(read);