Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Mar 2003

    Reading chunks of data at a time


    I would like to establish an HTTP connection to a server that provides streamed data in chunks, for example stock quotes or heartbeats. It seems that in MIDP the Connector.openInputStream method does not return until it has read ALL the data from the server, which makes it impossible to read a long HTTP response in small chunks.

    I have control over the server so I've tried http features such as "Connection: Keep-Alive" and "Transfer-Encoding: chunked" but that just results in the input stream reaching -1 prematurely.

    Any ideas?


  2. #2
    Registered User
    Join Date
    Mar 2003
    You need to be more specific about the http headers you are using and the device you are testing on. This is because on many (dare I say most) devices, you are going through a WAP gateway which could be the source of your problem.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts