public class

PropertiesBasedResumableProcessor

extends Object
implements ResumableAsyncHandler.ResumableProcessor
java.lang.Object
   ↳ com.ning.http.client.resumable.PropertiesBasedResumableProcessor

Class Overview

A ResumableAsyncHandler.ResumableProcessor which use a properties file to store the download index information.

Summary

Public Constructors
PropertiesBasedResumableProcessor()
Public Methods
Map<String, Long> load()
Load the Map in memory, contains information about the transferred bytes.
void put(String url, long transferredBytes)
Associate a key with the number of bytes sucessfully transferred.
void remove(String uri)
Remove the key associate value.
void save(Map<String, Long> map)
Save the current Map instance which contains information about the current transfer state.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.ning.http.client.resumable.ResumableAsyncHandler.ResumableProcessor

Public Constructors

public PropertiesBasedResumableProcessor ()

Public Methods

public Map<String, Long> load ()

Load the Map in memory, contains information about the transferred bytes.

Returns
  • Map

public void put (String url, long transferredBytes)

Associate a key with the number of bytes sucessfully transferred.

Parameters
url a key. The recommended way is to use an url.
transferredBytes The number of bytes sucessfully transferred.

public void remove (String uri)

Remove the key associate value.

Parameters
uri key from which the value will be discarted

public void save (Map<String, Long> map)

Save the current Map instance which contains information about the current transfer state. This method *only* invoked when the JVM is shutting down.