docs: private final byte[] encodePart(JsMsgPart jsPart) throws MessageEncodeFailedException {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "encodePart", jsPart);
  
      JMFMessage msg = (JMFMessage)jsPart.jmfPart;
      byte[] buffer = null;
      int length = 0;
  
      try {
          length = msg.getEncodedLength();
          buffer = msg.toByteArray(length);
      }
      catch (Exception e) {
        // Dump the message part, and whatever we've managed to encode so far.
        FFDCFilter.processException(e, "com.ibm.ws.sib.mfp.impl.JsMsgObject.encodePart", "jmo630", this,
            new Object[] {
              new Object[] { MfpConstants.DM_MESSAGE, msg, theMessage },
              new Object[] { MfpConstants.DM_BUFFER, buffer, Integer.valueOf(0), Integer.valueOf(length) }
            }
          );
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "encode failed: " + e);
        throw new MessageEncodeFailedException(e);
      }
  
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "encodePart", Integer.valueOf(length));
      return buffer;
  
    }