Win a copy of Java Persistence with Spring Data and Hibernate this week in the Spring forum!
  • 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
  • Ron McLeod
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris
Bartenders:

downloading a file in parts

 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can i download one file in parts..??

i mean suppose there is 100 MB file.. and i want to download first 5 MB first.. read the content first then remove the first part and then the next five.. and so on..??

can any one provide me code for that..??
 
author & internet detective
Posts: 41578
881
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Amit,
Do you mean a streaming download of the format:


Note that this only works for some file formats. Others, such as PDF, require knowing the full length of the file for header info before outputting anything.

This is for the server part. Or do you mean on the client?
 
Amit Bathla
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ya right..

streaming media

actually i am trying to make a news server...i want to transfer the data to other nodes by concept of streaming media...
 
Jeanne Boyarsky
author & internet detective
Posts: 41578
881
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Amit,
In that case, the key is to get the data to display in a loop, flushing at the end of each part so the browser gets the data.
 
Who knew that furniture could be so violent? Put this tiny ad out there to see what happens:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
    Bookmark Topic Watch Topic
  • New Topic