|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xnap.plugin.opennap.net.OpenNapSegment
public class OpenNapSegment
The end of the segment can change through a split.
Field Summary | |
---|---|
static long |
MIN_SEGEMENT_SIZE
The minimun size for a single segment. |
Constructor Summary | |
---|---|
OpenNapSegment(long start,
long end,
long total)
|
|
OpenNapSegment(OpenNapSegmentData data,
long total)
Creates a new segment based on resume data. |
Method Summary | |
---|---|
java.lang.Object |
clone()
|
int |
getAvailability()
|
OpenNapDownload |
getDownload()
Returns the download currently downloading the segment. |
long |
getDownloadOffset()
Returns the download offset that should be sent to the peer. |
long |
getEnd()
|
java.io.File |
getFile()
|
long |
getFileOffset()
Returns the file offset to seek to when matching the overlap |
OpenNapSegment |
getNext()
|
int |
getOverlap()
Returns the number of bytes that need to be matched. |
OpenNapSegment |
getPrevious()
|
long |
getStart()
|
long |
getTotal()
|
long |
getTransferred()
|
boolean |
isFinished()
|
void |
setDownload(OpenNapDownload download)
|
void |
setFile(java.io.File file)
Modifies: file |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final long MIN_SEGEMENT_SIZE
Constructor Detail |
---|
public OpenNapSegment(long start, long end, long total)
public OpenNapSegment(OpenNapSegmentData data, long total)
data.start
to total
.
Method Detail |
---|
public java.lang.Object clone()
clone
in class java.lang.Object
public int getAvailability()
getAvailability
in interface Segment
public long getEnd()
getEnd
in interface Segment
public OpenNapDownload getDownload()
public long getDownloadOffset()
public long getFileOffset()
public java.io.File getFile()
public OpenNapSegment getNext()
public int getOverlap()
public OpenNapSegment getPrevious()
public long getStart()
getStart
in interface Segment
public long getTotal()
getTotal
in interface Segment
public long getTransferred()
getTransferred
in interface Segment
public boolean isFinished()
public void setDownload(OpenNapDownload download)
public void setFile(java.io.File file)
Modifies: file
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |