class ResumeFilter extends AbstractDownloadFilter {

    @Override
    public boolean accept(final Path file, final Local local, final TransferStatus parent) throws BackgroundException {
        if(local.isFile()) {
            if(local.exists()) {
                // Read remote attributes
                final PathAttributes attributes = attribute.find(file);
                if(local.attributes().getSize() == attributes.getSize()) {
                    if(Checksum.NONE != attributes.getChecksum()) {
                        final ChecksumCompute compute = ChecksumComputeFactory.get(attributes.getChecksum().algorithm);
                        if(compute.compute(local.getInputStream(), parent).equals(attributes.getChecksum())) {
                            if(log.isInfoEnabled()) {
                                log.info(String.format("Skip file %s with checksum %s", file, local.attributes().getChecksum()));
                            }
                            return false;
                        }
                        else {
                            log.warn(String.format("Checksum mismatch for %s and %s", file, local));
                        }
                    }
                    else {
                        if(log.isInfoEnabled()) {
                            log.info(String.format("Skip file %s with local size %d", file, local.attributes().getSize()));
                        }
                        // No need to resume completed transfers
                        return false;
                    }
                }
            }
        }
        return super.accept(file, local, parent);
    }

    public  ResumeFilter(final SymlinkResolver<Path> symlinkResolver, final Session<?> session);
    public  ResumeFilter(final SymlinkResolver<Path> symlinkResolver, final Session<?> session,
                        final DownloadFilterOptions options);
    public  ResumeFilter(final SymlinkResolver<Path> symlinkResolver, final Session<?> session,
                        final DownloadFilterOptions options, final Download download);

}