public static void main(final String[] args) throws DocumentException, SecurityException,
NoSuchMethodException, IllegalArgumentException, IllegalAccessException,
InvocationTargetException, InstantiationException, ClassNotFoundException {
final byte[] buffer = new byte[4096];
final Waypoint wp = new Waypoint();
wp.setIdent("TestWP");
wp.setPosition(new Position(54.12343, -123.2334));
wp.setComment("that's it");
final int len = Mapper.toMessage(buffer, 6, wp, "D100");
final StringBuilder b = new StringBuilder();
for (int i = 0; i < len; i++) {
final byte element = buffer[i];
b.append(Integer.toHexString(element & 0xff | 0x100).substring(1) + " ");