Java: resume Download in URLConnection

Try:

connection.setRequestProperty("Range", "bytes=" + fcheck.length() + "-");

Lowercase the range specifier per the spec. Also, if your partial file was 500 bytes, that means your byte range that you have is 0-499, and you want 500+.


The problem is in (fcheck.length() - 1): this should be fcheck.length().