Package com.google.zxing.oned.rss
Class RSS14Reader
java.lang.Object
com.google.zxing.oned.OneDReader
com.google.zxing.oned.rss.AbstractRSSReader
com.google.zxing.oned.rss.RSS14Reader
- All Implemented Interfaces:
Reader
Decodes RSS-14, including truncated and stacked variants. See ISO/IEC 24724:2006.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int[][]
private static final int[]
private static final int[]
private static final int[]
private static final int[]
private static final int[]
private static final int[]
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static void
addOrTally
(Collection<Pair> possiblePairs, Pair pair) private void
adjustOddEvenCounts
(boolean outsideChar, int numModules) private static boolean
checkChecksum
(Pair leftPair, Pair rightPair) private static Result
constructResult
(Pair leftPair, Pair rightPair) private DataCharacter
decodeDataCharacter
(BitArray row, FinderPattern pattern, boolean outsideChar) private Pair
decodePair
(BitArray row, boolean right, int rowNumber, Map<DecodeHintType, ?> hints) 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[]
findFinderPattern
(BitArray row, boolean rightFinderPattern) private FinderPattern
parseFoundFinderPattern
(BitArray row, int rowNumber, boolean right, int[] startEnd) void
reset()
Resets any internal state the implementation has after a decode, to prepare it for reuse.Methods inherited from class com.google.zxing.oned.rss.AbstractRSSReader
count, decrement, getDataCharacterCounters, getDecodeFinderCounters, getEvenCounts, getEvenRoundingErrors, getOddCounts, getOddRoundingErrors, increment, isFinderPattern, parseFinderValue
Methods inherited from class com.google.zxing.oned.OneDReader
decode, decode, patternMatchVariance, recordPattern, recordPatternInReverse
-
Field Details
-
OUTSIDE_EVEN_TOTAL_SUBSET
private static final int[] OUTSIDE_EVEN_TOTAL_SUBSET -
INSIDE_ODD_TOTAL_SUBSET
private static final int[] INSIDE_ODD_TOTAL_SUBSET -
OUTSIDE_GSUM
private static final int[] OUTSIDE_GSUM -
INSIDE_GSUM
private static final int[] INSIDE_GSUM -
OUTSIDE_ODD_WIDEST
private static final int[] OUTSIDE_ODD_WIDEST -
INSIDE_ODD_WIDEST
private static final int[] INSIDE_ODD_WIDEST -
FINDER_PATTERNS
private static final int[][] FINDER_PATTERNS -
possibleLeftPairs
-
possibleRightPairs
-
-
Constructor Details
-
RSS14Reader
public RSS14Reader()
-
-
Method Details
-
decodeRow
public Result decodeRow(int rowNumber, BitArray row, Map<DecodeHintType, ?> hints) throws NotFoundExceptionDescription 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 found
-
addOrTally
-
reset
public void reset()Description copied from interface:Reader
Resets any internal state the implementation has after a decode, to prepare it for reuse.- Specified by:
reset
in interfaceReader
- Overrides:
reset
in classOneDReader
-
constructResult
-
checkChecksum
-
decodePair
-
decodeDataCharacter
private DataCharacter decodeDataCharacter(BitArray row, FinderPattern pattern, boolean outsideChar) throws NotFoundException - Throws:
NotFoundException
-
findFinderPattern
- Throws:
NotFoundException
-
parseFoundFinderPattern
private FinderPattern parseFoundFinderPattern(BitArray row, int rowNumber, boolean right, int[] startEnd) throws NotFoundException - Throws:
NotFoundException
-
adjustOddEvenCounts
- Throws:
NotFoundException
-