hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: InputStreamEntity not closing InputStream
Date Mon, 11 Apr 2011 11:12:00 GMT
On Mon, 2011-04-11 at 10:31 +0800, LongkerDandy wrote:
> Hi
> 
> I noticed the InputStreamEntity.writeTo doesn't close the InputStream when
> writing is done.
> Compare to FileEntity which closed the FileInputStream in final block.
> 
> Does this closed/handled elsewhere? Or I have to handle it myself?
> 
> If I have to close it myself, how do I know when the transfer is completed?
> Example, I can use the FileInputStream with InputStreamEntity:
> 
> InputStream is = new FileInputStream(myFile);
> HttpEntity entity = new InputStreamEntity(is, myFile.size());
> response.setEntity(entity);
> 
> Then how do I close the InputStream properly.
> 
> Thanks
> LongkerDandy


It is clearly a bug. Please raise a JIRA for this issue. 

Oleg


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message