1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.xnap.plugin.azureus;
21
22 import org.xnap.transfer.Segment;
23
24 /***
25 *
26 */
27 public class AzureusDownloadSegment implements Segment {
28
29
30
31 private long start;
32 private long end;
33 private long totalSize;
34
35
36
37 private Segment parentSegment;
38
39
40
41 public AzureusDownloadSegment(long totalSize, long start, long end, Segment parentSegment)
42 {
43 this.totalSize = totalSize;
44 this.start = start;
45 this.end = end;
46 this.parentSegment = parentSegment;
47 }
48
49 public int getAvailability()
50 {
51 return parentSegment.getAvailability();
52 }
53
54 /***
55 * @see org.xnap.transfer.Segment#getEnd()
56 */
57 public long getEnd()
58 {
59 return end;
60 }
61
62 /***
63 * @see org.xnap.transfer.Segment#getStart()
64 */
65 public long getStart()
66 {
67 return start;
68 }
69
70 /***
71 * @see org.xnap.transfer.Segment#getTotal()
72 */
73 public long getTotal()
74 {
75 return totalSize;
76 }
77
78 /***
79 * @see org.xnap.transfer.Segment#getTransferred()
80 */
81 public long getTransferred()
82 {
83 return parentSegment.getTransferred();
84 }
85
86
87
88 }