Open fxlcy opened 3 years ago
RangeDownloader文件 shadowFileBuffer.put(buffer, 0, readLen)可能会出现该问题
解决方法 shadowFileBuffer.put(buffer, 0, readLen)之前加上
if (readLen > shadowFileBuffer.remaining()) { val size = shadowChannel.size() val newFileBuffer = shadowChannel .map(READ_WRITE, current, size) shadowFileBuffer = newFileBuffer }
RangeDownloader文件 shadowFileBuffer.put(buffer, 0, readLen)可能会出现该问题
解决方法 shadowFileBuffer.put(buffer, 0, readLen)之前加上
if (readLen > shadowFileBuffer.remaining()) { val size = shadowChannel.size() val newFileBuffer = shadowChannel .map(READ_WRITE, current, size) shadowFileBuffer = newFileBuffer }