src/net/java/sip/communicator/impl/protocol/jabber/TransportManagerJabberImpl.java
/**
     * Removes a content with a specific name from a specific collection of
     * contents and closes any associated <tt>StreamConnector</tt>.
     *
     * @param contents the collection of contents to remove the content with the
     * specified name from
     * @param name the name of the content to remove
     * @return the removed <tt>ContentPacketExtension</tt> if any; otherwise,
     * <tt>null</tt>
     */
Removes a content with a specific name from a specific collection of
contents and closes any associated StreamConnector.

@param contents the collection of contents to remove the content with the
specified name from
@param name the name of the content to remove
@return the removed ContentPacketExtension if any; otherwise,
null
Removes a content with a specific name from a specific collection of contents and closes any associated StreamConnector . @param contents the collection of contents to remove the content with the specified name from @param name the name of the content to remove @return the removed ContentPacketExtension if any ; otherwise null
protected ContentPacketExtension removeContent(
            Iterable<ContentPacketExtension> contents,
            String name)
    {
        for (Iterator<ContentPacketExtension> contentIter = contents.iterator();
                contentIter.hasNext();)
        {
            ContentPacketExtension content = contentIter.next();
            if (name.equals(content.getName()))
            {
                contentIter.remove();
                MediaType mediaType = JingleUtils.getMediaType(content);
                if (mediaType != null)
                {
                    closeStreamConnector(mediaType);
                }
                return content;
            }
        }
        return null;
    }
protected ContentPacketExtension removeContent ( Iterable < ContentPacketExtension > contents , String name ) { for ( Iterator < ContentPacketExtension > contentIter = contents . iterator ( ) ; contentIter . hasNext ( ) ; ) { ContentPacketExtension content = contentIter . next ( ) ; if ( name . equals ( content . getName ( ) ) ) { contentIter . remove ( ) ; MediaType mediaType = JingleUtils . getMediaType ( content ) ; if ( mediaType != null ) { closeStreamConnector ( mediaType ) ; } return content ; } } return null ; }
Removes a content with a specific name from a specific collection of
 contents and closes any associated <tt>StreamConnector</tt>.
Removes a content with a specific name from a specific collection of contents and closes any associated <tt > StreamConnector< / tt > .
// closeStreamConnector