code: void openStream() throws SmackException, InterruptedException, XmlPullParserException {
          sendStreamOpen();
          packetReader.parser = PacketParserUtils.newXmppParser(reader);
      }
docs: Resets the parser using the latest connection's reader. Resetting 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.
  
  @throws SmackException if the parser could not be reset.
  @throws InterruptedException
  @throws XmlPullParserException