1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-10 17:49:38 +02:00

XEP-0084: User Avatar

Co-authored-by: Paul Schaub <vanitasvitae@fsfe.org>
This commit is contained in:
Fernando Ramirez 2021-01-28 18:25:25 +01:00 committed by Paul Schaub
parent 1df0763f92
commit 0f5297c957
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
23 changed files with 2045 additions and 0 deletions

View file

@ -18,6 +18,7 @@ package org.jivesoftware.smack.util;
import java.io.IOException;
import java.io.Writer;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
@ -361,6 +362,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;
}
/**
* Same as {@link #optAttribute(String, CharSequence)}, but with a different method name. This method can be used if
* the provided attribute value argument type causes ambiguity in method overloading. For example if the type is a