class BreakpointLocalCheck {

    public boolean isInfoRightToResume() {
        final int blockCount = info.getBlockCount();

        if (blockCount <= 0) return false;
        if (info.isChunked()) return false;
        if (info.getFile() == null) return false;
        final File fileOnTask = task.getFile();
        if (!info.getFile().equals(fileOnTask)) return false;
        if (info.getFile().length() > info.getTotalLength()) return false;

        if (responseInstanceLength > 0 && info.getTotalLength() != responseInstanceLength) {
            return false;
        }

        for (int i = 0; i < blockCount; i++) {
            BlockInfo blockInfo = info.getBlock(i);
            if (blockInfo.getContentLength() <= 0) return false;
        }

        return true;
    }

    public  BreakpointLocalCheck(@NonNull DownloadTask task, @NonNull BreakpointInfo info,
                                long responseInstanceLength);

}