code: public byte[] flattenToBytes() {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "flattenToBytes");
  
      int uuidBytesLength = 0;
      byte [] uuidBytes = null;
  
      // check if uuid is null
      if (uuid != null)
      {
        uuidBytes = uuid.toByteArray();
        uuidBytesLength = uuidBytes.length;
      }
  
      int totalArraySize = ArrayUtil.SHORT_SIZE + ArrayUtil.INT_SIZE + uuidBytesLength + ArrayUtil.LONG_SIZE;
      byte [] flattenedBytes = new byte [totalArraySize];
      int offset = 0;
  
      // write the version number
      ArrayUtil.writeShort(flattenedBytes, offset ,versionNumber);
      offset += ArrayUtil.SHORT_SIZE;
  
      // write the length of the uuid byteArray (which will be 0 if the uuid is null)
      ArrayUtil.writeInt(flattenedBytes, offset, uuidBytesLength);
      offset += ArrayUtil.INT_SIZE;
  
      if (uuid != null)
      {
        // if the uuid is not null, write the uuid byteArray
        ArrayUtil.writeBytes(flattenedBytes, offset, uuidBytes);
        offset += uuidBytesLength;
      }
  
      // write the value. Comment on value declaration above states that this will never be null.
      ArrayUtil.writeLong(flattenedBytes, offset, value.longValue());
  
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "flattenToBytes");
      return flattenedBytes;
    }
docs: Flattens the SIMessageHandle to a byte array.
  This flattened format can be restored into a SIMessageHandle by using
  com.ibm.wsspi.sib.core.SIMessageHandleRestorer.restoreFromBytes(byte [] data)
  
  Format of flattened bytes is:
  
  (short) versionNumber
  (int) length of uuid byteArray (0 if uuid is null)
  uuid byteArray (if not null)
  (long) value
  
  @see com.ibm.wsspi.sib.core.SIMessageHandleRestorer#restoreFromBytes(byte[])
  @return byte[] The flattened SIMessageHandle.