1 |
|
package org.apache.torque.mojo.morph; |
2 |
|
|
3 |
|
import java.io.File; |
4 |
|
import java.io.FileInputStream; |
5 |
|
import java.io.FileNotFoundException; |
6 |
|
import java.io.FileOutputStream; |
7 |
|
import java.io.InputStream; |
8 |
|
import java.io.OutputStream; |
9 |
|
|
|
|
| 0% |
Uncovered Elements: 22 (22) |
Complexity: 10 |
Complexity Density: 0.71 |
|
10 |
|
public class FileMorphRequest extends MorphRequest { |
11 |
|
File oldFile; |
12 |
|
File newFile; |
13 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
14 |
0
|
public FileMorphRequest(File oldFile, File newFile) {... |
15 |
0
|
super(); |
16 |
0
|
this.oldFile = oldFile; |
17 |
0
|
this.newFile = newFile; |
18 |
|
} |
19 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
20 |
0
|
public FileMorphRequest() {... |
21 |
0
|
this(null, null); |
22 |
|
} |
23 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
24 |
0
|
public File getOldFile() {... |
25 |
0
|
return oldFile; |
26 |
|
} |
27 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
28 |
0
|
public void setOldFile(File oldFile) {... |
29 |
0
|
this.oldFile = oldFile; |
30 |
|
} |
31 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
32 |
0
|
public File getNewFile() {... |
33 |
0
|
return newFile; |
34 |
|
} |
35 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
36 |
0
|
public void setNewFile(File newFile) {... |
37 |
0
|
this.newFile = newFile; |
38 |
|
} |
39 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 2 |
Complexity Density: 0.67 |
|
40 |
0
|
@Override... |
41 |
|
public InputStream getInputStream() { |
42 |
0
|
try { |
43 |
0
|
return new FileInputStream(oldFile); |
44 |
|
} catch (FileNotFoundException e) { |
45 |
0
|
throw new RuntimeException(e); |
46 |
|
} |
47 |
|
} |
48 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 2 |
Complexity Density: 0.67 |
|
49 |
0
|
@Override... |
50 |
|
public OutputStream getOutputStream() { |
51 |
0
|
try { |
52 |
0
|
return new FileOutputStream(newFile); |
53 |
|
} catch (FileNotFoundException e) { |
54 |
0
|
throw new RuntimeException(e); |
55 |
|
} |
56 |
|
} |
57 |
|
|
58 |
|
} |