Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
unspecified
-
None
Description
Method InputStream.read(buffer) returns number of bytes read into the buffer.
Tapestry FAQ contains example "How do I stream a file to the user from tapestry?":
byte[] data = new byte[1024];
...
while (in.read(data) > -1)
=============
It should be something like:
int len;
while ((len = in.read(data)) > -1)
=============
Or I'm wrong and response.setContentLength() will handle this?
Tapestry FAQ:
http://jakarta.apache.org/tapestry/faq.html#faq-N1012F