final class DecodedBitStreamParser
extends java.lang.Object
Data Matrix Codes can encode text as bits in one of several modes, and can use multiple modes in one Data Matrix Code. This class decodes the bits back into text.
See ISO 16022:2006, 5.2.1 - 5.2.9.2
Modifier and Type | Class and Description |
---|---|
private static class |
DecodedBitStreamParser.Mode |
Modifier and Type | Field and Description |
---|---|
private static char[] |
C40_BASIC_SET_CHARS
See ISO 16022:2006, Annex C Table C.1
The C40 Basic Character Set (*'s used for placeholders for the shift values)
|
private static char[] |
C40_SHIFT2_SET_CHARS |
private static char[] |
TEXT_BASIC_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 char[] |
TEXT_SHIFT2_SET_CHARS |
private static char[] |
TEXT_SHIFT3_SET_CHARS |
Modifier | Constructor and Description |
---|---|
private |
DecodedBitStreamParser() |
Modifier and Type | Method and Description |
---|---|
(package private) static DecoderResult |
decode(byte[] bytes) |
private static void |
decodeAnsiX12Segment(BitSource bits,
ECIStringBuilder result)
See ISO 16022:2006, 5.2.7
|
private static DecodedBitStreamParser.Mode |
decodeAsciiSegment(BitSource bits,
ECIStringBuilder result,
java.lang.StringBuilder resultTrailer,
java.util.Set<java.lang.Integer> fnc1positions)
See ISO 16022:2006, 5.2.3 and Annex C, Table C.2
|
private static void |
decodeBase256Segment(BitSource bits,
ECIStringBuilder result,
java.util.Collection<byte[]> byteSegments)
See ISO 16022:2006, 5.2.9 and Annex B, B.2
|
private static void |
decodeC40Segment(BitSource bits,
ECIStringBuilder result,
java.util.Set<java.lang.Integer> fnc1positions)
See ISO 16022:2006, 5.2.5 and Annex C, Table C.1
|
private static void |
decodeECISegment(BitSource bits,
ECIStringBuilder result)
See ISO 16022:2007, 5.4.1
|
private static void |
decodeEdifactSegment(BitSource bits,
ECIStringBuilder result)
See ISO 16022:2006, 5.2.8 and Annex C Table C.3
|
private static void |
decodeTextSegment(BitSource bits,
ECIStringBuilder result,
java.util.Set<java.lang.Integer> fnc1positions)
See ISO 16022:2006, 5.2.6 and Annex C, Table C.2
|
private static void |
parseTwoBytes(int firstByte,
int secondByte,
int[] result) |
private static int |
unrandomize255State(int randomizedBase256Codeword,
int base256CodewordPosition)
See ISO 16022:2006, Annex B, B.2
|
private static final char[] C40_BASIC_SET_CHARS
private static final char[] C40_SHIFT2_SET_CHARS
private static final char[] TEXT_BASIC_SET_CHARS
private static final char[] TEXT_SHIFT2_SET_CHARS
private static final char[] TEXT_SHIFT3_SET_CHARS
static DecoderResult decode(byte[] bytes) throws FormatException
FormatException
private static DecodedBitStreamParser.Mode decodeAsciiSegment(BitSource bits, ECIStringBuilder result, java.lang.StringBuilder resultTrailer, java.util.Set<java.lang.Integer> fnc1positions) throws FormatException
FormatException
private static void decodeC40Segment(BitSource bits, ECIStringBuilder result, java.util.Set<java.lang.Integer> fnc1positions) throws FormatException
FormatException
private static void decodeTextSegment(BitSource bits, ECIStringBuilder result, java.util.Set<java.lang.Integer> fnc1positions) throws FormatException
FormatException
private static void decodeAnsiX12Segment(BitSource bits, ECIStringBuilder result) throws FormatException
FormatException
private static void parseTwoBytes(int firstByte, int secondByte, int[] result)
private static void decodeEdifactSegment(BitSource bits, ECIStringBuilder result)
private static void decodeBase256Segment(BitSource bits, ECIStringBuilder result, java.util.Collection<byte[]> byteSegments) throws FormatException
FormatException
private static void decodeECISegment(BitSource bits, ECIStringBuilder result) throws FormatException
FormatException
private static int unrandomize255State(int randomizedBase256Codeword, int base256CodewordPosition)