docs: public final byte[] getMessageRepresentationFromDest(JmsDestination dest, EncodingLevel encodingLevel) throws JMSException {
  
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "getMessageRepresentationFromDest", new Object[]{dest, encodingLevel});
  
      boolean isTopic = false;
      byte[] encodedDest = null;
      ByteArrayOutputStream baos = new ByteArrayOutputStream();        // initial size of 32 is probably OK
  
      if (dest == null) {
        // Error case.
        JMSException e = (JMSException)JmsErrorUtils.newThrowable(JMSException.class,
              "INTERNAL_INVALID_VALUE_CWSIA0361",
              new Object[] {"null", "JmsDestination"}, tc);
        FFDCFilter.processException(e,"MsgDestEncodingUtilsImpl","getMessageRepresentationFromDest#1", this);
        throw e;
      }
  
      // If the JmsDestination is a Topic, note it for later use
      if (dest instanceof Topic) {
        isTopic = true;
      }
  
      // This variable is used to obtain a list of all the destination's properties,
      // giving us a copy which is safe for us to mess around with.
      Map<String,Object> destProps = ((JmsDestinationImpl)dest).getCopyOfProperties();
  
      // Now fiddle around with our copy of the properties, so we get the set we need to encode
      manipulateProperties(destProps, isTopic, encodingLevel);
  
      // Encode the basic stuff - Queue/Topic, DeliveryMode, Priority & TTL
      encodeBasicProperties(baos, isTopic, destProps);
  
      // Encode the rest of the properties
      encodeOtherProperties(baos, destProps);
  
      // Extract the byte array to return
      encodedDest = baos.toByteArray();
  
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "getMessageRepresentationFromDest", encodedDest);
      return encodedDest;
    }