docs: public int getMessageLength() {
      // Message type, number of type specifications
      int length = 1 + 4;
  
      if (this.attributeSpecifications != null) {
        for (AttributeSpecification spec : this.attributeSpecifications) {
          // alias, Name length, transient byte
          length += (4 + 4 + 1);
          if (spec.getAttributeName() != null) {
            try {
              length += spec.getAttributeName().getBytes("UTF-16BE").length;
            } catch (UnsupportedEncodingException e) {
              log.error("Unable to encode UTF-16BE strings.");
            }
          }
        }
      }
  
      if (this.origin != null) {
        try {
          length += this.origin.getBytes("UTF-16BE").length;
        } catch (UnsupportedEncodingException e) {
          log.error("Unable to encode UTF-16 strings.");
          e.printStackTrace();
        }
      }
  
      return length;
    }