Hi,
I'm trying to process an inputstream that is chunked. Due
to project constraints, I can't use HttpClient, but instead
I have to work directly with a socket.
I'm wrapping the inputstream like this:
BufferedReader in = new BufferedReader(new InputStreamReader(new
ChunkedInputStream(inputStream)))
where ChunkedInputStream is from
org.apache.commons.httpclient.ChunkedInputStream
I fire off my http request and a chunked response comes back (verified
using
Ethereal)
Meanwhile, I'm calling:
while(!in.ready()) {
try {
Thread.sleep(50);
} catch (InterruptedException e) {
}
}
...
... other lines of code to deal with parsing the data coming back
...
The problem is that in.ready() never ever returns true!
Am I doing something terribly wrong?
(btw, I know the while would loop forever, but I've stripped out the
code that kills the loop if a condition is reached...)
I do hope someone can help.
Thanks!
-=david=-
This email and the files transmitted with it are meant solely for the use of
the individual addressee(s) named above. They may contain confidential and/or
legally privileged information. If you are not the addressee(s) or responsible
for delivery of the message to the addressee(s), please delete it from your
system and contact the sender right away. The opinions, conclusions and other
information in this message which do not relate to the official business of
Wanadoo UK plc are not necessarily endorsed by it. Wanadoo UK plc has taken
steps to ensure that this email and any attachments are virus-free, but it
remains your responsibility to confirm and ensure this.
Wanadoo UK plc is a subsidiary of France Telecom SA. Our registered office is
at: Verulam Point, Station Way, St. Albans, Herts, AL1 5HE, and we are
registered in England and Wales, as Company No. 3014367
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]