Daniil Sosonkin wrote:
Somewhere down the line, there is too much buffering going on.
ASIDE: Your quite right and evidently there isn't "any" buffering where
it needs to be... around the FileInputStream... ;-)
Oh well... I guess if something isn't built in people won't probably use
it as is case time and time again with InputStreams and Buffering... .
--Nikolaos
I've written a video download ActionBean some years ago; it was
sending 100MB files with no problems. The code is below and is
identical to yours. How much memory to give to your application engine?
return new
StreamingResolution("application/octet-stream") {
protected void stream(HttpServletResponse
response) throws Exception
{
String sp = File.separator;
InputStream in = new
FileInputStream(video.getLocation() + sp + video.getFilename());
try
{
OutputStream out =
response.getOutputStream();
byte[] buf = new byte[1024 * 65];
int size = 0;
while ((size = in.read(buf)) > 0)
out.write(buf, 0, size);
}
finally
{
in.close();
}
}
}.setFilename(video.getOriginalFilename());
}
Daniil
------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users