• Post Reply Bookmark Topic Watch Topic
  • New Topic

need to set Too big file in HTTPRespose  RSS feed

 
vipin dwivedi
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
As per our requirement , we need to set a 30 MB file content as a String the HTTPResponse, we are doing at present as :
if(bSendContent)
{
response.setContentType("application/pdf");
response.setHeader("Content-Disposition", "inline");
response.setContentLength(byteContent.length);
outStream = response.getOutputStream();
outStream.write(byteContent, 0, byteContent.length);
outStream.flush();
}
its taking aroung 60 Sec.
Can any one help me to reduce this time?
any clue will be great help for me..
Thanks in advance.

Vipin Dwivedi
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could try gunzipping the file. Some containers can do this for you (IE Tomcat). All the up-to-date browsers can handle gunzipped files these days.
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes right. you can try GZIP algorithm using filter. Actually Filters are the best in doing these kinda stuff. I have a link for you. This is a free online book having the whole GZIP algorithm implemented using Filter.

cheers.
[ February 01, 2005: Message edited by: Adeel Ansari ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!