src/main/java/org/jivesoftware/smack/PacketReader.java
private void resetParser() {
        try {
            innerReader = new XPPPacketReader();
            innerReader.setXPPFactory(XmlPullParserFactory.newInstance());
            innerReader.getXPPParser().setInput(connection.reader);
            reset = true;
        } catch (Exception xppe) {
            LOGGER.log(Level.WARN, "Error while resetting parser", xppe);
        }
    }
private void resetParser() {
        try {
            innerReader = new XPPPacketReader();
            innerReader.setXPPFactory(XmlPullParserFactory.newInstance());
            innerReader.getXPPParser().setInput(connection.reader);
            reset = true;
        } catch (Exception xppe) {
            LOGGER.log(Level.WARN, "Error while resetting parser", xppe);
        }
    }
Resets the parser using the latest connection's reader. Reseting the
parser is necessary when the plain connection has been secured or when a
new opening stream element is going to be sent by the server.