| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
package org.kuali.maven.wagon; |
| 17 |
|
|
| 18 |
|
import java.io.File; |
| 19 |
|
import java.io.FileNotFoundException; |
| 20 |
|
import java.io.FileOutputStream; |
| 21 |
|
import java.io.IOException; |
| 22 |
|
|
| 23 |
|
|
| 24 |
|
@link |
| 25 |
|
|
| 26 |
|
|
| 27 |
|
@author |
| 28 |
|
@since |
| 29 |
|
|
|
|
|
| 0% |
Uncovered Elements: 18 (18) |
Complexity: 5 |
Complexity Density: 0.42 |
|
| 30 |
|
class TransferProgressFileOutputStream extends FileOutputStream { |
| 31 |
|
|
| 32 |
|
private TransferProgress progress; |
| 33 |
|
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 34 |
0
|
public TransferProgressFileOutputStream(File file, TransferProgress progress) throws FileNotFoundException {... |
| 35 |
0
|
super(file); |
| 36 |
0
|
this.progress = progress; |
| 37 |
|
} |
| 38 |
|
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 39 |
0
|
public void write(int b) throws IOException {... |
| 40 |
0
|
super.write(b); |
| 41 |
0
|
progress.notify(new byte[]{(byte) b}, 1); |
| 42 |
|
} |
| 43 |
|
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 44 |
0
|
public void write(byte b[]) throws IOException {... |
| 45 |
0
|
super.write(b); |
| 46 |
0
|
progress.notify(b, b.length); |
| 47 |
|
} |
| 48 |
|
|
|
|
|
| 0% |
Uncovered Elements: 8 (8) |
Complexity: 2 |
Complexity Density: 0.33 |
|
| 49 |
0
|
public void write(byte b[], int off, int len) throws IOException {... |
| 50 |
0
|
super.write(b, off, len); |
| 51 |
0
|
if (off == 0) { |
| 52 |
0
|
progress.notify(b, len); |
| 53 |
|
} else { |
| 54 |
0
|
byte[] bytes = new byte[len]; |
| 55 |
0
|
System.arraycopy(b, off, bytes, 0, len); |
| 56 |
0
|
progress.notify(bytes, len); |
| 57 |
|
} |
| 58 |
|
} |
| 59 |
|
} |