• 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

How to implement file downloading functionality ?

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I am developing a web application which provides very large data files(file size is equal to about 500 MB) for downloading.
Can anyone tell me, how to implement this ?
Also I want to know , what is FTP file downloading & HTTP file downloading ? Which one I should use ?




Regards
Ritesh
 
Ranch Hand
Posts: 820
IntelliJ IDE VI Editor Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
a few questions.
Are the files compressed already?
How much traffic are you expecting?
Have you looked into Amazon S3?

You will want to avoid loading the entire file into memory and then trying to send it. Instead, use streams.


This is a good thread about using streams for downloading large files. link

With FTP you will need a separate program on your sever, an FTP server. Your users will need an FTP client.
HTTP downloads allows your web server to do the job.

also read this post on handling large data files
 
Ritesh Badwaik
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Thanks for the reply.
The files are already compressed.
Can you please explain me how to implement HTTP downloads using java ?
Does it require any program to be installed like FTP ?



Regards
Ritesh
 
Tim McGuire
Ranch Hand
Posts: 820
IntelliJ IDE VI Editor Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK you have a servlet. and you have a file called huge.txt:


I adapted this from http://snippets.dzone.com/posts/show/4629
 
reply
    Bookmark Topic Watch Topic
  • New Topic