Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7903087
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T09:39:36+00:00 2026-06-03T09:39:36+00:00

I`m using BufferedReader in Android to receive http stream connection , when parse message

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T09:39:37+00:00Added an answer on June 3, 2026 at 9:39 am

    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

    try {
        bytesRemainingInChunk = Integer.parseInt(chunkSizeString.trim(), 16);
    } catch (NumberFormatException e) {
        throw new IOException("Expected a hex chunk size, but was " + chunkSizeString);
    }
    

    Looks like something incorrect in the data.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to using logcat and debugging in Android. I've analyzing someone else's code
Using android 2.3.3, I have a background Service which has a socket connection. There's
I am trying to parse a json object using gson in Android application ,the
Hi i am using the following code to parse a certificate details.Everything is fine
I am using a class to use HTTP POST & getting data from a
I have implemented an android program that can receive simple messages using the MJSIP,
I am using ical4j to parse the ical format on the Android. My input
trying to send Arabic text from android to PHP file using the code below
I'm reading a file using bufferedreader, so lets say i have line = br.readLine();
I have 2 sockets and I am using BufferedReader around it's InputStreams. What I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.