1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 package org.opencastproject.fileupload.api.job;
23
24 import javax.xml.bind.annotation.XmlAccessType;
25 import javax.xml.bind.annotation.XmlAccessorType;
26 import javax.xml.bind.annotation.XmlElement;
27 import javax.xml.bind.annotation.XmlRootElement;
28 import javax.xml.bind.annotation.XmlType;
29
30
31
32
33
34 @XmlType(name = "chunk", namespace = "http://fileupload.opencastproject.org")
35 @XmlRootElement(name = "chunk", namespace = "http://fileupload.opencastproject.org")
36 @XmlAccessorType(XmlAccessType.NONE)
37 public class Chunk {
38
39 @XmlElement(name = "number")
40 private int number = -1;
41 @XmlElement(name = "bytes-received")
42 private long received = 0;
43
44 public Chunk() {
45 }
46
47 public Chunk(int number, long received) {
48 this.number = number;
49 this.received = received;
50 }
51
52 public int getNumber() {
53 return number;
54 }
55
56 public void setNumber(int number) {
57 this.number = number;
58 }
59
60 public int incrementNumber() {
61 return ++number;
62 }
63
64 public long getReceived() {
65 return received;
66 }
67
68 public void setReceived(long received) {
69 this.received = received;
70 }
71 }