public final class CodaBarReader extends OneDReader
Decodes Codabar barcodes.
Modifier and Type | Field and Description |
---|---|
(package private) static char[] |
ALPHABET |
private static java.lang.String |
ALPHABET_STRING |
(package private) static int[] |
CHARACTER_ENCODINGS
These represent the encodings of characters, as patterns of wide and narrow bars.
|
private int |
counterLength |
private int[] |
counters |
private java.lang.StringBuilder |
decodeRowResult |
private static float |
MAX_ACCEPTABLE |
private static int |
MIN_CHARACTER_LENGTH |
private static float |
PADDING |
private static char[] |
STARTEND_ENCODING |
Constructor and Description |
---|
CodaBarReader() |
Modifier and Type | Method and Description |
---|---|
(package private) static boolean |
arrayContains(char[] array,
char key) |
private void |
counterAppend(int e) |
Result |
decodeRow(int rowNumber,
BitArray row,
java.util.Map<DecodeHintType,?> hints)
Attempts to decode a one-dimensional barcode format given a single row of
an image.
|
private int |
findStartPattern() |
private void |
setCounters(BitArray row)
Records the size of all runs of white and black pixels, starting with white.
|
private int |
toNarrowWidePattern(int position) |
private void |
validatePattern(int start) |
decode, decode, patternMatchVariance, recordPattern, recordPatternInReverse, reset
private static final float MAX_ACCEPTABLE
private static final float PADDING
private static final java.lang.String ALPHABET_STRING
static final char[] ALPHABET
static final int[] CHARACTER_ENCODINGS
private static final int MIN_CHARACTER_LENGTH
private static final char[] STARTEND_ENCODING
private final java.lang.StringBuilder decodeRowResult
private int[] counters
private int counterLength
public Result decodeRow(int rowNumber, BitArray row, java.util.Map<DecodeHintType,?> hints) throws NotFoundException
OneDReader
Attempts to decode a one-dimensional barcode format given a single row of an image.
decodeRow
in class OneDReader
rowNumber
- row number from top of the rowrow
- the black/white pixel data of the rowhints
- decode hintsResult
containing encoded string and start/end of barcodeNotFoundException
- if no potential barcode is foundprivate void validatePattern(int start) throws NotFoundException
NotFoundException
private void setCounters(BitArray row) throws NotFoundException
row
- row to count fromNotFoundException
private void counterAppend(int e)
private int findStartPattern() throws NotFoundException
NotFoundException
static boolean arrayContains(char[] array, char key)
private int toNarrowWidePattern(int position)