This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Distributed Java and the fly likes Download files in chunk sizes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Distributed Java
Bookmark "Download files in chunk sizes" Watch "Download files in chunk sizes" New topic
Author

Download files in chunk sizes

Rahul
Greenhorn

Joined: Nov 23, 2005
Posts: 1
Hi,

I want to write a program where I have to download the files of any type in chunk sizes.
For example: If the size of file is 2 MB & the server does not allow to download it completely in one request, then I have to download it in suppose 5KB sizes.

Can you please tell me how can I do this.
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

It's strange for a server to implement a policy like this, unless it's some kind of hosting service and it's to discourage people from hosting large files. This "chunking" behavior already occurs at a lower level - it's part of the TCP/IP network "stack" to break large files (or any sort of transmission) into manageable smaller packages. You could still implement this at a higher level, but I'm not sure what you would gain from it, unless just as an exercise. What sort of technology were you planning on using?

Unfortunately, "Rahul" does not meet the JavaRanch Naming Policy. User names cannot be obviously fake and must constist of a first name and a last name.

You can change your user name here.

Thanks! and welcome to the JavaRanch!


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
 
GeeCON Prague 2014
 
subject: Download files in chunk sizes