| 1 |
|
package org.kuali.maven.wagon; |
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
@author |
| 7 |
|
|
| 8 |
|
@since |
| 9 |
|
|
|
|
|
| 0% |
Uncovered Elements: 24 (24) |
Complexity: 9 |
Complexity Density: 0.6 |
|
| 10 |
|
public class TransferTracker { |
| 11 |
|
long initiated; |
| 12 |
|
long started; |
| 13 |
|
long completed; |
| 14 |
|
int byteCount; |
| 15 |
|
SimpleFormatter formatter = new SimpleFormatter(); |
| 16 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 17 |
0
|
public long getInitiated() {... |
| 18 |
0
|
return initiated; |
| 19 |
|
} |
| 20 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 21 |
0
|
public void setInitiated(long initiated) {... |
| 22 |
0
|
this.initiated = initiated; |
| 23 |
|
} |
| 24 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 25 |
0
|
public long getStarted() {... |
| 26 |
0
|
return started; |
| 27 |
|
} |
| 28 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 29 |
0
|
public void setStarted(long started) {... |
| 30 |
0
|
this.started = started; |
| 31 |
|
} |
| 32 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 33 |
0
|
public long getCompleted() {... |
| 34 |
0
|
return completed; |
| 35 |
|
} |
| 36 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 37 |
0
|
public void setCompleted(long completed) {... |
| 38 |
0
|
this.completed = completed; |
| 39 |
|
} |
| 40 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 41 |
0
|
public int getByteCount() {... |
| 42 |
0
|
return byteCount; |
| 43 |
|
} |
| 44 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 45 |
0
|
public void setByteCount(int byteCount) {... |
| 46 |
0
|
this.byteCount = byteCount; |
| 47 |
|
} |
| 48 |
|
|
|
|
|
| 0% |
Uncovered Elements: 7 (7) |
Complexity: 1 |
Complexity Density: 0.14 |
|
| 49 |
0
|
public String toString() {... |
| 50 |
0
|
long elapsed = completed - started; |
| 51 |
0
|
StringBuffer sb = new StringBuffer(); |
| 52 |
0
|
sb.append("[" + formatter.getTime(elapsed)); |
| 53 |
0
|
sb.append(", " + formatter.getSize(byteCount)); |
| 54 |
0
|
sb.append(", " + formatter.getRate(elapsed, byteCount)); |
| 55 |
0
|
sb.append("]"); |
| 56 |
0
|
return sb.toString(); |
| 57 |
|
} |
| 58 |
|
} |