| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
|
| 17 |
|
|
| 18 |
|
|
| 19 |
|
|
| 20 |
|
package org.xwiki.filter.output; |
| 21 |
|
|
| 22 |
|
import java.io.IOException; |
| 23 |
|
import java.io.OutputStream; |
| 24 |
|
|
| 25 |
|
|
| 26 |
|
@version |
| 27 |
|
@since |
| 28 |
|
|
| |
|
| 62.5% |
Uncovered Elements: 6 (16) |
Complexity: 7 |
Complexity Density: 0.88 |
|
| 29 |
|
public class DefaultOutputStreamOutputTarget implements OutputStreamOutputTarget |
| 30 |
|
{ |
| 31 |
|
private final boolean close; |
| 32 |
|
|
| 33 |
|
private final OutputStream outputStream; |
| 34 |
|
|
| 35 |
|
|
| 36 |
|
@link@link |
| 37 |
|
|
| 38 |
|
@link@link |
| 39 |
|
|
| 40 |
|
@param@link |
| 41 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 42 |
26 |
public DefaultOutputStreamOutputTarget(OutputStream outputStream)... |
| 43 |
|
{ |
| 44 |
26 |
this(outputStream, false); |
| 45 |
|
} |
| 46 |
|
|
| 47 |
|
|
| 48 |
|
@link@link |
| 49 |
|
|
| 50 |
|
@param@link |
| 51 |
|
@param@link@link |
| 52 |
|
@since |
| 53 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 54 |
26 |
public DefaultOutputStreamOutputTarget(OutputStream outputStream, boolean close)... |
| 55 |
|
{ |
| 56 |
26 |
this.outputStream = outputStream; |
| 57 |
26 |
this.close = close; |
| 58 |
|
} |
| 59 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 60 |
0 |
@Override... |
| 61 |
|
public boolean restartSupported() |
| 62 |
|
{ |
| 63 |
0 |
return false; |
| 64 |
|
} |
| 65 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 66 |
25 |
@Override... |
| 67 |
|
public OutputStream getOutputStream() |
| 68 |
|
{ |
| 69 |
25 |
return this.outputStream; |
| 70 |
|
} |
| 71 |
|
|
| |
|
| 50% |
Uncovered Elements: 2 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
| 72 |
25 |
@Override... |
| 73 |
|
public void close() throws IOException |
| 74 |
|
{ |
| 75 |
25 |
if (this.close) { |
| 76 |
0 |
this.outputStream.close(); |
| 77 |
|
} |
| 78 |
|
} |
| 79 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 80 |
0 |
@Override... |
| 81 |
|
public String toString() |
| 82 |
|
{ |
| 83 |
0 |
return this.outputStream.toString(); |
| 84 |
|
} |
| 85 |
|
} |