Parse Exception: At line 1, column 0: no element found

后端 未结 6 1748
半阙折子戏
半阙折子戏 2021-01-06 00:54

I have a weird issue. I receive the following error that causes a force-close:

org.apache.harmony.xml.ExpatParser$ParseException: At line 1, column 0:

6条回答
  •  佛祖请我去吃肉
    2021-01-06 01:02

    Per InputStream javadoc the method will block until the data is available or the EOF is encountered. So, the other side of Socket needs to close it - then the inStream.read() call will return.

    If you use BufferedReader , you can read in a line-by-line manner. The readLine() method will return as soon as a line from HTTP response is read.

提交回复
热议问题