File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Download files in chunk sizes


Joined: Nov 23, 2005
Posts: 1

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

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!

Write once, run anywhere, because there's nowhere to hide! - /. A.C.
I agree. Here's the link:
subject: Download files in chunk sizes
It's not a secret anymore!