File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Download files in chunk sizes

 
Rahul
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4121
IntelliJ IDE Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic