DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=27366>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=27366

GetMethod.getResponseBodyAsStream() .available() could return content-length





------- Additional Comments From [EMAIL PROTECTED]  2004-03-08 21:16 -------
> I do not think we should violate standard Java API even in such a
> subtle manner.  The purpose of InputStream#available() method is
> different and we should not get too creative about Java API.

I agree that the available() method is not documented to mean "length
of stream", however even Java's own ProgressMonitorInputStream uses it
this way.  Gosling wrote that class, and in it he sets size =
available().  If available() only returns the amount of data currently
buffered, the ProgressMonitor does nothing useful.  I guess it would
have been nice if the InputStream base class had a "length()" method
as well.  

Anyway, I can implement the behavior by writing an extension class, so
no need for you to violate the API in HttpClient.  Feel free to close
this enhancement request, and thanks for your consideration.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to