1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-22 22:32:06 +01:00

Add Packet.toString()

This commit is contained in:
Florian Schmaus 2014-12-27 21:12:59 +01:00
parent 755765120d
commit 55a967da93

View file

@ -347,6 +347,12 @@ public abstract class Packet implements TopLevelStreamElement {
return removeExtension(extension.getElementName(), extension.getNamespace()); return removeExtension(extension.getElementName(), extension.getNamespace());
} }
@Override
// NOTE When Smack is using Java 8, then this method should be moved in Element as "Default Method".
public String toString() {
return toXML().toString();
}
/** /**
* Returns the extension sub-packets (including properties data) as an XML * Returns the extension sub-packets (including properties data) as an XML
* String, or the Empty String if there are no packet extensions. * String, or the Empty String if there are no packet extensions.