|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xnap.plugin.opennap.util.OpenNapBinaryResumeRepository
public class OpenNapBinaryResumeRepository
Provides a binary repository that stores File
objects. This
class can be used to store download files that need to be resumed
later.
This class is mostly thread safe (except for iterator()
).
Field Summary | |
---|---|
static java.lang.String |
FILENAME
|
Constructor Summary | |
---|---|
OpenNapBinaryResumeRepository()
|
Method Summary | |
---|---|
void |
add(OpenNapDownloadContainerData data)
Adds file to the repository. |
java.util.Iterator |
iterator()
Returns an iterator over all items in the repository. |
boolean |
read()
Reads File objects from filename and adds them
to the repository. |
void |
remove(OpenNapDownloadContainerData data)
Removes file from the repository. |
void |
write(java.lang.String filename)
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
Constructor Detail |
---|
public OpenNapBinaryResumeRepository()
Method Detail |
---|
public void add(OpenNapDownloadContainerData data)
file
to the repository.
public java.util.Iterator iterator()
public boolean read() throws java.io.IOException
File
objects from filename
and adds them
to the repository.
filename
- the name of the repository filefallbackPath
- if a file in the repository does not exist,
it is looked up in this path
File
objects were read successfully or
repository did not exist; false, otherwise
java.io.IOException
#add(File)
public void remove(OpenNapDownloadContainerData data)
file
from the repository.
public void write(java.lang.String filename) throws java.io.IOException
filename
.
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |