* See ISO 16022:2006, Annex C Table C.1
* The C40 Basic Character Set (*'s used for placeholders for the shift values)
*/
- private static final char[] C40_BASIC_SET_CHARS = new char[]{
+ private static final char[] C40_BASIC_SET_CHARS = {
'*', '*', '*', ' ', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N',
'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
};
- private static final char[] C40_SHIFT2_SET_CHARS = new char[]{
+ private static final char[] C40_SHIFT2_SET_CHARS = {
'!', '"', '#', '$', '%', '&', '\'', '(', ')', '*', '+', ',', '-', '.',
'/', ':', ';', '<', '=', '>', '?', '@', '[', '\\', ']', '^', '_'
};
* See ISO 16022:2006, Annex C Table C.2
* The Text Basic Character Set (*'s used for placeholders for the shift values)
*/
- private static final char[] TEXT_BASIC_SET_CHARS = new char[]{
+ private static final char[] TEXT_BASIC_SET_CHARS = {
'*', '*', '*', ' ', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n',
'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'
};
- private static final char[] TEXT_SHIFT3_SET_CHARS = new char[]{
+ private static final char[] TEXT_SHIFT3_SET_CHARS = {
'\'', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N',
'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '{', '|', '}', '~', 127
};
/**
* See ISO 18004:2006, 6.4.4 Table 5
*/
- private static final char[] ALPHANUMERIC_CHARS = new char[]{
+ private static final char[] ALPHANUMERIC_CHARS = {
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B',
'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N',
'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
public void testAsciiStandardDecode() throws ReaderException {
// ASCII characters 0-127 are encoded as the value + 1
- byte[] bytes = new byte[]{(byte) ('a' + 1), (byte) ('b' + 1), (byte) ('c' + 1),
- (byte) ('A' + 1), (byte) ('B' + 1), (byte) ('C' + 1)};
+ byte[] bytes = {(byte) ('a' + 1), (byte) ('b' + 1), (byte) ('c' + 1),
+ (byte) ('A' + 1), (byte) ('B' + 1), (byte) ('C' + 1)};
String decodedString = DecodedBitStreamParser.decode(bytes);
assertEquals("abcABC", decodedString);
}
public void testAsciiDoubleDigitDecode() throws ReaderException{
// ASCII double digit (00 - 99) Numeric Value + 130
- byte[] bytes = new byte[]{(byte) (00 + 130), (byte) (01 + 130),
- (byte) (98 + 130), (byte) (99 + 130)};
+ byte[] bytes = {(byte) 130 , (byte) ( 1 + 130),
+ (byte) (98 + 130), (byte) (99 + 130)};
String decodedString = DecodedBitStreamParser.decode(bytes);
assertEquals("00019899", decodedString);
}