aspose file tools*
The moose likes Java in General and the fly likes downloading a file in parts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "downloading a file in parts" Watch "downloading a file in parts" New topic
Author

downloading a file in parts

Amit Bathla
Ranch Hand

Joined: Feb 11, 2005
Posts: 51
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..??


Amit
University of Florida
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29233
    
136

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?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Amit Bathla
Ranch Hand

Joined: Feb 11, 2005
Posts: 51
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 29233
    
136

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: downloading a file in parts
 
Similar Threads
Applet + Database
how do download managers work
Where can I download binaries for J2EE1.3.1 for Linux ?
Download files in chunk sizes
[S2] Multiple files sent simulatneously with out.write() results in corrupted data streams