code: public DataSlice getAssembledContent() {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) JmfTr.entry(this, tc, "getAssembledContent");
  
      DataSlice result = null;
  
      // lock the message - we don't want someone clearing the contents while we're doing this
      synchronized (getMessageLockArtefact()) {
  
        // If contents isn't null, the message is assembled so we can return something useful
        if (contents != null) {
  
          // We must mark the contents as shared now we're handing them out
          sharedContents = true;                                                  // d348294.1
          result = new DataSlice(contents, messageOffset, length);
        }
      }
  
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) JmfTr.exit(this, tc, "getAssembledContent", result);
      return result;
    }
docs: Locking: Requires the lock as it relies on, and may change, vital instance variable(s).