public final class EAN13Reader extends UPCEANReader
Implements decoding of the EAN-13 format.
Modifier and Type | Field and Description |
---|---|
private int[] |
decodeMiddleCounters |
(package private) static int[] |
FIRST_DIGIT_ENCODINGS |
END_PATTERN, L_AND_G_PATTERNS, L_PATTERNS, MIDDLE_PATTERN, START_END_PATTERN
Constructor and Description |
---|
EAN13Reader() |
Modifier and Type | Method and Description |
---|---|
protected int |
decodeMiddle(BitArray row,
int[] startRange,
java.lang.StringBuilder resultString)
Subclasses override this to decode the portion of a barcode between the start
and end guard patterns.
|
private static void |
determineFirstDigit(java.lang.StringBuilder resultString,
int lgPatternFound)
Based on pattern of odd-even ('L' and 'G') patterns used to encoded the explicitly-encoded
digits in a barcode, determines the implicitly encoded first digit and adds it to the
result string.
|
(package private) BarcodeFormat |
getBarcodeFormat()
Get the format of this decoder.
|
checkChecksum, checkStandardUPCEANChecksum, decodeDigit, decodeEnd, decodeRow, decodeRow, findGuardPattern, findStartGuardPattern, getStandardUPCEANChecksum
decode, decode, patternMatchVariance, recordPattern, recordPatternInReverse, reset
static final int[] FIRST_DIGIT_ENCODINGS
private final int[] decodeMiddleCounters
protected int decodeMiddle(BitArray row, int[] startRange, java.lang.StringBuilder resultString) throws NotFoundException
UPCEANReader
decodeMiddle
in class UPCEANReader
row
- row of black/white values to searchstartRange
- start/end offset of start guard patternresultString
- StringBuilder
to append decoded chars toNotFoundException
- if decoding could not complete successfullyBarcodeFormat getBarcodeFormat()
UPCEANReader
getBarcodeFormat
in class UPCEANReader
private static void determineFirstDigit(java.lang.StringBuilder resultString, int lgPatternFound) throws NotFoundException
resultString
- string to insert decoded first digit intolgPatternFound
- int whose bits indicates the pattern of odd/even L/G patterns used to
encode digitsNotFoundException
- if first digit cannot be determined