104

Java使用HttpUrlConnection实现多线程断点下载 - 李建昌的专栏 - CSDN博客

 6 years ago
source link: http://blog.csdn.net/ljcitworld/article/details/78142642
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
相信很多同学在面试的时候,经常会被面试官问到这么一个问题:请问如何实现断点下载,即在文件未下载完成时,保存进度,在下次继续下载。要实现这个功能其实并不难,只要使用一个临时文件记录当前的下载进度,然后在下次下载时,从临时文件记录的进度开始下载,从而实现功能。当你实现以上功能之后,面试官可能又会问:那能不能实现多线程的断点下载?这个问题的话,其实如果你解决了第一个问题之后,就很容易解决这个问题

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK