| 1 |
|
package org.europa.together.domain; |
| 2 |
|
|
| 3 |
|
import java.util.Arrays; |
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (8) |
Complexity: 3 |
Complexity Density: 0.6 |
|
| 8 |
|
public enum ByteOrderMark { |
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
NONE("NONE", new byte[]{}), |
| 14 |
|
|
| 15 |
|
|
| 16 |
|
|
| 17 |
|
UTF_8("UTF-8", new byte[]{(byte) 0xEF, (byte) 0xBB, (byte) 0xBF}), |
| 18 |
|
|
| 19 |
|
|
| 20 |
|
|
| 21 |
|
UTF_16LE("UTF-16LE", new byte[]{(byte) 0xFF, (byte) 0xFE}), |
| 22 |
|
|
| 23 |
|
|
| 24 |
|
|
| 25 |
|
UTF_16BE("UTF-16BE", new byte[]{(byte) 0xFE, (byte) 0xFF}), |
| 26 |
|
|
| 27 |
|
|
| 28 |
|
|
| 29 |
|
UTF_32LE("UTF-32LE", new byte[]{(byte) 0xFF, (byte) 0xFE, (byte) 0x00, (byte) 0x00}), |
| 30 |
|
|
| 31 |
|
|
| 32 |
|
|
| 33 |
|
UTF_32BE("UTF-32BE", new byte[]{(byte) 0x00, (byte) 0x00, (byte) 0xFE, (byte) 0xFF}); |
| 34 |
|
|
| 35 |
|
private final String type; |
| 36 |
|
private final byte[] value; |
| 37 |
|
|
| 38 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 39 |
6 |
ByteOrderMark(final String type, final byte[] value) {... |
| 40 |
6 |
this.type = type; |
| 41 |
6 |
this.value = value; |
| 42 |
|
} |
| 43 |
|
|
| 44 |
|
|
| 45 |
|
|
| 46 |
|
|
| 47 |
|
@return |
| 48 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 49 |
82 |
public byte[] getBytes() {... |
| 50 |
82 |
byte[] val = Arrays.copyOf(this.value, this.value.length); |
| 51 |
82 |
return val; |
| 52 |
|
} |
| 53 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 54 |
25 |
@Override... |
| 55 |
|
public String toString() { |
| 56 |
25 |
return this.type; |
| 57 |
|
} |
| 58 |
|
} |