| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xnap.plugin.opennap.net.OpenNapSegment
public class OpenNapSegment
The end of the segment can change through a split.
| Field Summary | |
|---|---|
| static long | MIN_SEGEMENT_SIZEThe 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.Objectpublic int getAvailability()
getAvailability in interface Segmentpublic long getEnd()
getEnd in interface Segmentpublic 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 Segmentpublic long getTotal()
getTotal in interface Segmentpublic long getTransferred()
getTransferred in interface Segmentpublic 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 | |||||||||