I`m using BufferedReader in Android to receive http stream connection , when parse message I received use code:
url = new URL(HOST_URL_PUSHMESSAGE);
urlConnection = url.openConnection();
in = (InputStream) urlConnection.getContent();
reader = new BufferedReader(new InputStreamReader(in));
line = reader.readLine();
in.close();
It looks work well but Sometime I got IOException – Expected a hex chunk size,but was..
Happened in:
line = reader.readLine();
How does this happen & How can this be resolved?
Does change bufferedreader size help?
Thanks
See the source
http://www.java2s.com/Open-Source/Android/android-core/platform-libcore/org/apache/harmony/luni/internal/net/www/protocol/http/ChunkedInputStream.java.htm
The exception happens there
Looks like something incorrect in the data.