|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xnap.plugin.opennap.net.OpenNapResumeRepository
public class OpenNapResumeRepository
Provides a repository that handles the resume information for downloads in the incomplete directory.
This class is mostly thread safe (except for iterator()
).
Field Summary | |
---|---|
static java.lang.String |
FILENAME_PREFIX
The prefix used for resume files. |
Constructor Summary | |
---|---|
OpenNapResumeRepository()
|
Method Summary | |
---|---|
void |
add(java.io.File path,
OpenNapDownloadContainerData download)
Adds a download to the repository. |
java.util.Iterator |
iterator()
Returns an iterator over all items in the repository. |
void |
remove(OpenNapDownloadContainerData download)
Removes a download from the repository, i.e. when the download has succeeded. |
void |
restore(java.io.File path)
Scans a directory for resume files and adds the found downloads. |
void |
save(java.io.File path)
Writes repository content to filename . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String FILENAME_PREFIX
Constructor Detail |
---|
public OpenNapResumeRepository()
Method Detail |
---|
public void add(java.io.File path, OpenNapDownloadContainerData download)
path
- the incomplete directorypublic java.util.Iterator iterator()
public void remove(OpenNapDownloadContainerData download)
public void restore(java.io.File path)
path
- the directory to scan#add(OpenNapDownloadContainerData)
public void save(java.io.File path)
filename
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |