final class DecodedBitStreamParser
extends java.lang.Object
This class contains the methods for decoding the PDF417 codewords.
Modifier and Type | Class and Description |
---|---|
private static class |
DecodedBitStreamParser.Mode |
Modifier and Type | Field and Description |
---|---|
private static int |
AL |
private static int |
AS |
private static int |
BEGIN_MACRO_PDF417_CONTROL_BLOCK |
private static int |
BEGIN_MACRO_PDF417_OPTIONAL_FIELD |
private static int |
BYTE_COMPACTION_MODE_LATCH |
private static int |
BYTE_COMPACTION_MODE_LATCH_6 |
private static int |
ECI_CHARSET |
private static int |
ECI_GENERAL_PURPOSE |
private static int |
ECI_USER_DEFINED |
private static java.math.BigInteger[] |
EXP900
Table containing values for the exponent of 900.
|
private static int |
LL |
private static int |
MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE |
private static int |
MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM |
private static int |
MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME |
private static int |
MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE |
private static int |
MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT |
private static int |
MACRO_PDF417_OPTIONAL_FIELD_SENDER |
private static int |
MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP |
private static int |
MACRO_PDF417_TERMINATOR |
private static int |
MAX_NUMERIC_CODEWORDS |
private static char[] |
MIXED_CHARS |
private static int |
ML |
private static int |
MODE_SHIFT_TO_BYTE_COMPACTION_MODE |
private static int |
NUMBER_OF_SEQUENCE_CODEWORDS |
private static int |
NUMERIC_COMPACTION_MODE_LATCH |
private static int |
PAL |
private static int |
PL |
private static int |
PS |
private static char[] |
PUNCT_CHARS |
private static int |
TEXT_COMPACTION_MODE_LATCH |
Modifier | Constructor and Description |
---|---|
private |
DecodedBitStreamParser() |
Modifier and Type | Method and Description |
---|---|
private static int |
byteCompaction(int mode,
int[] codewords,
int codeIndex,
ECIStringBuilder result)
Byte Compaction mode (see 5.4.3) permits all 256 possible 8-bit byte values to be encoded.
|
(package private) static DecoderResult |
decode(int[] codewords,
java.lang.String ecLevel) |
private static java.lang.String |
decodeBase900toBase10(int[] codewords,
int count)
Convert a list of Numeric Compacted codewords from Base 900 to Base 10.
|
(package private) static int |
decodeMacroBlock(int[] codewords,
int codeIndex,
PDF417ResultMetadata resultMetadata) |
private static DecodedBitStreamParser.Mode |
decodeTextCompaction(int[] textCompactionData,
int[] byteCompactionData,
int length,
ECIStringBuilder result,
DecodedBitStreamParser.Mode startMode)
The Text Compaction mode includes all the printable ASCII characters
(i.e.
|
private static int |
numericCompaction(int[] codewords,
int codeIndex,
ECIStringBuilder result)
Numeric Compaction mode (see 5.4.4) permits efficient encoding of numeric data strings.
|
private static int |
textCompaction(int[] codewords,
int codeIndex,
ECIStringBuilder result)
Text Compaction mode (see 5.4.1.5) permits all printable ASCII characters to be
encoded, i.e.
|
private static final int TEXT_COMPACTION_MODE_LATCH
private static final int BYTE_COMPACTION_MODE_LATCH
private static final int NUMERIC_COMPACTION_MODE_LATCH
private static final int BYTE_COMPACTION_MODE_LATCH_6
private static final int ECI_USER_DEFINED
private static final int ECI_GENERAL_PURPOSE
private static final int ECI_CHARSET
private static final int BEGIN_MACRO_PDF417_CONTROL_BLOCK
private static final int BEGIN_MACRO_PDF417_OPTIONAL_FIELD
private static final int MACRO_PDF417_TERMINATOR
private static final int MODE_SHIFT_TO_BYTE_COMPACTION_MODE
private static final int MAX_NUMERIC_CODEWORDS
private static final int MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME
private static final int MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT
private static final int MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP
private static final int MACRO_PDF417_OPTIONAL_FIELD_SENDER
private static final int MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE
private static final int MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE
private static final int MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM
private static final int PL
private static final int LL
private static final int AS
private static final int ML
private static final int AL
private static final int PS
private static final int PAL
private static final char[] PUNCT_CHARS
private static final char[] MIXED_CHARS
private static final java.math.BigInteger[] EXP900
private static final int NUMBER_OF_SEQUENCE_CODEWORDS
static DecoderResult decode(int[] codewords, java.lang.String ecLevel) throws FormatException
FormatException
static int decodeMacroBlock(int[] codewords, int codeIndex, PDF417ResultMetadata resultMetadata) throws FormatException
FormatException
private static int textCompaction(int[] codewords, int codeIndex, ECIStringBuilder result) throws FormatException
codewords
- The array of codewords (data + error)codeIndex
- The current index into the codeword array.result
- The decoded data is appended to the result.FormatException
private static DecodedBitStreamParser.Mode decodeTextCompaction(int[] textCompactionData, int[] byteCompactionData, int length, ECIStringBuilder result, DecodedBitStreamParser.Mode startMode)
textCompactionData
- The text compaction data.byteCompactionData
- The byte compaction data if there
was a mode shift.length
- The size of the text compaction and byte compaction data.result
- The decoded data is appended to the result.startMode
- The mode in which decoding startsprivate static int byteCompaction(int mode, int[] codewords, int codeIndex, ECIStringBuilder result) throws FormatException
mode
- The byte compaction mode i.e. 901 or 924codewords
- The array of codewords (data + error)codeIndex
- The current index into the codeword array.result
- The decoded data is appended to the result.FormatException
private static int numericCompaction(int[] codewords, int codeIndex, ECIStringBuilder result) throws FormatException
codewords
- The array of codewords (data + error)codeIndex
- The current index into the codeword array.result
- The decoded data is appended to the result.FormatException
private static java.lang.String decodeBase900toBase10(int[] codewords, int count) throws FormatException
codewords
- The array of codewordscount
- The number of codewordsFormatException