hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Harrigan" <david.harri...@uk.wanadoo.com>
Subject Re: Problem with ChunkedInputStream (httpclient 3.0.1)?
Date Wed, 24 May 2006 20:46:34 GMT
Hi,

Thanks Oleg for your reply, but it does prompt some others...

If ready is not to be used, what is the recommended way to see if there
is data available from the server?

I've switched to using ChunkedInputStream from the HttpCore package, but
it requires a HttpDataReceiver rather than an inputstream, so I extended
AbstractHttpDataReceived calling super.init(inputStream, 16) in my extended
class.

I've hooked that up to the ChunkedInputStream now

return new BufferedReader(new InputStreamReader(new ChunkedInputStream(new MyHttpDataReceiver(inputStream,
16))));

Yet I can't seem to get data in! Here's MyHttpDataReceiver:  


class MyHttpDataReceiver extends AbstractHttpDataReceiver {
        
        public MyHttpDataReceiver(InputStream inputStream, int bufferSize) {
            super.init(inputStream, bufferSize);
        }

        public boolean isDataAvailable(int arg0) throws IOException {
            return true;
        }
        
    }


You can see I'm always returning true (just in case!) :)

Sorry, but I'm stuck!

Any help?

-=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: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


Mime
View raw message