JAVA: Encode Beacon MessagePack form MQTT via AB BLE Gateway 4.0

I found the Problem. the message was not always a Beacon, so it wasn`t always a map-format. So i have to check if the message is in map-format, then i can parse the massage like in the parse.java example.
https://github.com/AprilBrother/ab-ble-gateway-sdk/blob/master/gateway-v4/examples/java/http-server/Parse.java

just add the line:
if( unpacker.getNextFormat() == MessageFormat.FIXMAP) {