class PropertiesBasedResumableProcessor implements ResumableAsyncHandler.ResumableProcessor {
    private static final Logger log = LoggerFactory.getLogger(PropertiesBasedResumableProcessor.class);
    private static final File TMP = new File(System.getProperty("java.io.tmpdir"), "ahc");
    private static final String storeName = "ResumableAsyncHandler.properties";

    private final ConcurrentHashMap<String, Long> properties = new ConcurrentHashMap<>();

    private static String append(Map.Entry<String, Long> e) {
        return e.getKey() + '=' + e.getValue() + '\n';
    }

    @Override
    public void put(String url, long transferredBytes) {
        properties.put(url, transferredBytes);
    }

    @Override
    public void remove(String uri) {
        if (uri != null) {
            properties.remove(uri);
        }
    }

    @Override
    public void save(Map<String, Long> map) {
        log.debug("Saving current download state {}", properties);
        OutputStream os = null;
        try {

            if (!TMP.exists() && !TMP.mkdirs()) {
                throw new IllegalStateException("Unable to create directory: " + TMP.getAbsolutePath());
            }
            File f = new File(TMP, storeName);
            if (!f.exists() && !f.createNewFile()) {
                throw new IllegalStateException("Unable to create temp file: " + f.getAbsolutePath());
            }
            if (!f.canWrite()) {
                throw new IllegalStateException();
            }

            os = Files.newOutputStream(f.toPath());
            for (Map.Entry<String, Long> e : properties.entrySet()) {
                os.write(append(e).getBytes(UTF_8));
            }
            os.flush();
        } catch (Throwable e) {
            log.warn(e.getMessage(), e);
        } finally {
            closeSilently(os);
        }
    }

    @Override
    public Map<String, Long> load() {<FILL_FUNCTION_BODY>}
}

        Scanner scan = null;
        try {
            scan = new Scanner(new File(TMP, storeName), UTF_8);
            scan.useDelimiter("[=\n]");

            String key;
            String value;
            while (scan.hasNext()) {
                key = scan.next().trim();
                value = scan.next().trim();
                properties.put(key, Long.valueOf(value));
            }
            log.debug("Loading previous download state {}", properties);
        } catch (FileNotFoundException ex) {
            log.debug("Missing {}", storeName);
        } catch (Throwable ex) {
            // Survive any exceptions
            log.warn(ex.getMessage(), ex);
        } finally {
            if (scan != null) {
                scan.close();
            }
        }
        return Collections.unmodifiableMap(properties);
    
<no_super_class>