* @return
* @throws MessageFormatException
*/
private static MessageTypeException unexpected(String expected, byte b)
throws MessageTypeException {
ValueType type = ValueType.valueOf(b);
return new MessageTypeException(String.format("Expected %s, but got %s (%02x)", expected, type.toTypeName(), b));
}