Something went wrong. Try again.
Work fork of an Android Jabber client for bridge users git.sr.ht/~singpolyma/cheogram-android
sopranica sgx xmpp jabber
Something went wrong. Try again.
663 B · 21 lines
Java
at upstream
12345678910111213141516171819202122package im.conversations.android.xml;
import com.google.common.io.ByteSource;import eu.siacs.conversations.xml.Element;import eu.siacs.conversations.xml.XmlReader;import java.io.IOException;import java.io.InputStream;
public class XmlElementReader {
public static Element read(byte[] bytes) throws IOException { return read(ByteSource.wrap(bytes).openStream()); }
public static Element read(final InputStream inputStream) throws IOException { try (final XmlReader xmlReader = new XmlReader()) { xmlReader.setInputStream(inputStream); return xmlReader.readElement(xmlReader.readTag()); } }}