how to resume an interrupted download - part 2

前端 未结 3 1958
别那么骄傲
别那么骄傲 2020-11-28 02:38

This is a continuation of my previous question which I posted when I wasn\'t a registered user. As a refresher, I\'m trying to resume the downloading of a large file from m

3条回答
  •  无人及你
    2020-11-28 03:07

    Seems that problem is calling

    input = new BufferedInputStream(url.openStream(), 8192);
    

    instead of

    input = new BufferedInputStream(connection.getInputStream(), 8192);
    

    url.openStream() makes another call to openConnection() WITHOUT the range property.

提交回复
热议问题