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 6931941
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:38:32+00:00 2026-05-27T11:38:32+00:00

A while ago I worked on a parser for some binary data that parsed

  • 0

A while ago I worked on a parser for some binary data that parsed the data as the data was coming down the network. The important thing being that we didn’t have to wait for the entire set of bytes to download before we started parsing. This GREATLY improved the speed because it allowed for more threading, we were able to do something while the system waited for bytes.

On Android, is this possible with the Android HTTP classes? I would like something roughly similar too when some number of bytes are available, a callback is called, allowing me to parse those bytes while the system continues loading more bytes. I’ve worked with DefaultHttpClient a bit but am not sure if it supports what I’m looking for.

  • 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-05-27T11:38:33+00:00Added an answer on May 27, 2026 at 11:38 am

    Sure. The standard pattern for downloading data usually looks something like this:

    HttpClient httpclient = new DefaultHttpClient();
    HttpResponse response = httpclient.execute(new HttpGet(URL));
    

    HttpResponse has a method called getContent which returns an InputStream. You can just read a few bytes, do or queue off some processing on that data, then get some more data. Repeat as necessary.

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

Sidebar

Related Questions

A while ago, I came across some code that marked a data member of
A while ago I worked on a MS-SQL project and I remember a IS
A while ago I had a query that I ran quite a lot for
A while ago another question referred to the (possibly urban tale) statistic that ...
Authenticating to our Ubuntu EC2 instance worked fine until a little while ago. All
A while ago, I wrote a web-based guestbook application that wrote it's own database.
So I installed the Silverlight 3 SDK a while ago and VS worked fine.
A while ago, I wrote some Word interop examples in Visual Studio beta 1,
A while ago I needed a script to update some content every week, and
being a Java/Linux advocate, and having programmed my first Android app a while ago,

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.