• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

need to set Too big file in HTTPRespose

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic