1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2025-09-13 12:19:40 +02:00

XEP-0084: User Avatars

Co-authored-by: vanitasvitae <vanitasvitae@fsfe.org>
This commit is contained in:
Paul Schaub 2019-08-31 14:17:13 +02:00
parent f61ecb65e7
commit f5ac8246f6
22 changed files with 1806 additions and 1 deletions

View file

@ -19,6 +19,7 @@ package org.jivesoftware.smack.util;
import java.io.IOException;
import java.io.Writer;
import java.util.ArrayList;
import java.net.URL;
import java.util.Collection;
import java.util.Date;
import java.util.List;
@ -358,6 +359,13 @@ public class XmlStringBuilder implements Appendable, CharSequence, Element {
return this;
}
public XmlStringBuilder optAttribute(String name, URL url) {
if (url != null) {
attribute(name, url.toExternalForm());
}
return this;
}
/**
* Add the given attribute if {@code value => 0}.
*