Package com.google.zxing.oned
Class Code93Reader
java.lang.Object
com.google.zxing.oned.OneDReader
com.google.zxing.oned.Code93Reader
- All Implemented Interfaces:
Reader
Decodes Code 93 barcodes.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final char[]
(package private) static final String
(package private) static final int
(package private) static final int[]
These represent the encodings of characters, as patterns of wide and narrow bars.private final int[]
private final StringBuilder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static void
checkChecksums
(CharSequence result) private static void
checkOneChecksum
(CharSequence result, int checkPosition, int weightMax) private static String
decodeExtended
(CharSequence encoded) decodeRow
(int rowNumber, BitArray row, Map<DecodeHintType, ?> hints) Attempts to decode a one-dimensional barcode format given a single row of an image.private int[]
private static char
patternToChar
(int pattern) private static int
toPattern
(int[] counters) Methods inherited from class com.google.zxing.oned.OneDReader
decode, decode, patternMatchVariance, recordPattern, recordPatternInReverse, reset
-
Field Details
-
ALPHABET_STRING
- See Also:
-
ALPHABET
private static final char[] ALPHABET -
CHARACTER_ENCODINGS
static final int[] CHARACTER_ENCODINGSThese 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
-
counters
private final int[] counters
-
-
Constructor Details
-
Code93Reader
public Code93Reader()
-
-
Method Details
-
decodeRow
public Result decodeRow(int rowNumber, BitArray row, Map<DecodeHintType, ?> hints) throws NotFoundException, ChecksumException, FormatExceptionDescription copied from class:OneDReader
Attempts to decode a one-dimensional barcode format given a single row of an image.
- Specified by:
decodeRow
in classOneDReader
- Parameters:
rowNumber
- row number from top of the rowrow
- the black/white pixel data of the rowhints
- decode hints- Returns:
Result
containing 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
- Throws:
NotFoundException
-
toPattern
private static int toPattern(int[] counters) -
patternToChar
- Throws:
NotFoundException
-
decodeExtended
- Throws:
FormatException
-
checkChecksums
- Throws:
ChecksumException
-
checkOneChecksum
private static void checkOneChecksum(CharSequence result, int checkPosition, int weightMax) throws ChecksumException - Throws:
ChecksumException
-