/**
 *
 * Copyright 2020 Florian Schmaus
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.jivesoftware.smackx.bob.element;

import org.jivesoftware.smack.packet.ExtensionElement;
import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.smack.util.Objects;
import org.jivesoftware.smack.util.XmlStringBuilder;
import org.jivesoftware.smackx.bob.BoBData;
import org.jivesoftware.smackx.bob.BoBManager;
import org.jivesoftware.smackx.bob.ContentId;

/**
 * Bits of Binary data extension element.
 *
 * @author Florian Schmaus
 * @see <a href="http://xmpp.org/extensions/xep-0231.html">XEP-0231: Bits of
 *      Binary</a>
 */
public class BoBDataExtension implements ExtensionElement {

    public static final String ELEMENT = "data";
    public static final String NAMESPACE = BoBManager.NAMESPACE;

    private final ContentId cid;
    private final BoBData bobData;

    /**
     * Bits of Binary data extension constructor.
     *
     * @param cid TODO javadoc me please
     * @param bobData TODO javadoc me please
     */
    public BoBDataExtension(ContentId cid, BoBData bobData) {
        this.cid = Objects.requireNonNull(cid);
        this.bobData = Objects.requireNonNull(bobData);
    }

    @Override
    public String getElementName() {
        return ELEMENT;
    }

    @Override
    public String getNamespace() {
        return NAMESPACE;
    }

    @Override
    public XmlStringBuilder toXML(org.jivesoftware.smack.packet.XmlEnvironment enclosingNamespace) {
        XmlStringBuilder xml = new XmlStringBuilder(this);
        xml.attribute("cid", cid.getCid());
        xml.attribute("type", bobData.getType());
        xml.optAttribute("max-age", bobData.getMaxAge());
        xml.rightAngleBracket();

        xml.append(bobData.getContentBase64Encoded());

        xml.closeElement(this);
        return xml;
    }

    public static BoBDataExtension from(Message message) {
        return message.getExtension(BoBDataExtension.class);
    }

}

@@ -1887,32 +1887,389 @@
 MESPACE;%0A    %7D%0A%0A
+    /**%0A     * Get the content ID.%0A     *%0A     * @return the content ID.%0A     * @since 4.4.1%0A     */%0A    public final ContentId getContentId() %7B%0A        return cid;%0A    %7D%0A%0A    /**%0A     * Get the Bits of Binary (BOB) data.%0A     *%0A     * @return the BoB data.%0A     * @since 4.4.1%0A     */%0A    public final BoBData getBobData() %7B%0A        return bobData;%0A    %7D%0A%0A
     @Override%0A  

Add BoBDataExtension getBobData() and getContentId()