Package com.google.zxing.oned
Class Code93Reader
- java.lang.Object
-
- com.google.zxing.oned.OneDReader
-
- com.google.zxing.oned.Code93Reader
-
- All Implemented Interfaces:
Reader
public final class Code93Reader extends OneDReader
Decodes Code 93 barcodes.
- See Also:
Code39Reader
-
-
Field Summary
Fields Modifier and Type Field Description private static char[]ALPHABET(package private) static java.lang.StringALPHABET_STRING(package private) static intASTERISK_ENCODING(package private) static int[]CHARACTER_ENCODINGSThese represent the encodings of characters, as patterns of wide and narrow bars.private int[]countersprivate java.lang.StringBuilderdecodeRowResult
-
Constructor Summary
Constructors Constructor Description Code93Reader()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static voidcheckChecksums(java.lang.CharSequence result)private static voidcheckOneChecksum(java.lang.CharSequence result, int checkPosition, int weightMax)private static java.lang.StringdecodeExtended(java.lang.CharSequence encoded)ResultdecodeRow(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[]findAsteriskPattern(BitArray row)private static charpatternToChar(int pattern)private static inttoPattern(int[] counters)-
Methods inherited from class com.google.zxing.oned.OneDReader
decode, decode, patternMatchVariance, recordPattern, recordPatternInReverse, reset
-
-
-
-
Field Detail
-
ALPHABET_STRING
static final java.lang.String ALPHABET_STRING
- See Also:
- Constant Field Values
-
ALPHABET
private static final char[] ALPHABET
-
CHARACTER_ENCODINGS
static final int[] CHARACTER_ENCODINGS
These represent the encodings of characters, as patterns of wide and narrow bars. The 9 least-significant bits of each int correspond to the pattern of wide and narrow.
-
ASTERISK_ENCODING
static final int ASTERISK_ENCODING
-
decodeRowResult
private final java.lang.StringBuilder decodeRowResult
-
counters
private final int[] counters
-
-
Method Detail
-
decodeRow
public Result decodeRow(int rowNumber, BitArray row, java.util.Map<DecodeHintType,?> hints) throws NotFoundException, ChecksumException, FormatException
Description copied from class:OneDReaderAttempts to decode a one-dimensional barcode format given a single row of an image.
- Specified by:
decodeRowin classOneDReader- Parameters:
rowNumber- row number from top of the rowrow- the black/white pixel data of the rowhints- decode hints- Returns:
Resultcontaining encoded string and start/end of barcode- Throws:
NotFoundException- if no potential barcode is foundChecksumException- if a potential barcode is found but does not pass its checksumFormatException- if a potential barcode is found but format is invalid
-
findAsteriskPattern
private int[] findAsteriskPattern(BitArray row) throws NotFoundException
- Throws:
NotFoundException
-
toPattern
private static int toPattern(int[] counters)
-
patternToChar
private static char patternToChar(int pattern) throws NotFoundException- Throws:
NotFoundException
-
decodeExtended
private static java.lang.String decodeExtended(java.lang.CharSequence encoded) throws FormatException- Throws:
FormatException
-
checkChecksums
private static void checkChecksums(java.lang.CharSequence result) throws ChecksumException- Throws:
ChecksumException
-
checkOneChecksum
private static void checkOneChecksum(java.lang.CharSequence result, int checkPosition, int weightMax) throws ChecksumException- Throws:
ChecksumException
-
-