hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven Terrell <Steven.Terr...@guideworkstv.com>
Subject RE: Closing a stream when multithreading
Date Tue, 03 Jan 2006 15:51:52 GMT
I took a quick look at the code. In HttpMethodBase, the releaseConnection()
method does close the stream if there is one. It looks like the stream will
always be closed if you're using the base classes. 

--Steve

-----Original Message-----
From: Pesonen, Petteri [mailto:Petteri.Pesonen@satama.com] 
Sent: Monday, January 02, 2006 2:44 AM
To: httpclient-user@jakarta.apache.org
Subject: Closing a stream when multithreading

Hi,

I have updated to the HttpClient 3.0 and I have a questing concerning
the use of MultiThreadedHttpConnectionManager and the
method.getResponseBodyAsStream() method.

According to the code example in threading guide
(http://jakarta.apache.org/commons/httpclient/threading.html) the stream
returned by the getResponseBodyAsStream() is not closed, but then again
the main tutorial states:

"Call method.getResponseBodyAsStream() and read the entire contents of
the stream then call stream.close(). ..."

So, just to be sure. The stream must always be closed even when using
the MultiThreadedHttpConnectionManager? Right?


-- 
Petteri  :: +358-40-8619334

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org

---------------------------------------------------------------------
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