com.google.zxing.oned
Class ITFReader

java.lang.Object
  extended by com.google.zxing.oned.OneDReader
      extended by com.google.zxing.oned.ITFReader
All Implemented Interfaces:
Reader

public final class ITFReader
extends OneDReader

Implements decoding of the ITF format, or Interleaved Two of Five.

This Reader will scan ITF barcodes of certain lengths only. At the moment it reads length 6, 10, 12, 14, 16, 24, and 44 as these have appeared "in the wild". Not all lengths are scanned, especially shorter ones, to avoid false positives. This in turn is due to a lack of required checksum function.

The checksum is optional and is not applied by this Reader. The consumer of the decoded value will have to apply a checksum if required.

http://en.wikipedia.org/wiki/Interleaved_2_of_5 is a great reference for Interleaved 2 of 5 information.

Author:
kevin.osullivan@sita.aero, SITA Lab.

Field Summary
 
Fields inherited from class com.google.zxing.oned.OneDReader
INTEGER_MATH_SHIFT, PATTERN_MATCH_RESULT_SCALE_FACTOR
 
Constructor Summary
ITFReader()
           
 
Method Summary
 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.
 
Methods inherited from class com.google.zxing.oned.OneDReader
decode, decode, patternMatchVariance, recordPattern, recordPatternInReverse, reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ITFReader

public ITFReader()
Method Detail

decodeRow

public Result decodeRow(int rowNumber,
                        BitArray row,
                        java.util.Map<DecodeHintType,?> hints)
                 throws FormatException,
                        NotFoundException
Description copied from class: OneDReader

Attempts to decode a one-dimensional barcode format given a single row of an image.

Specified by:
decodeRow in class OneDReader
Parameters:
rowNumber - row number from top of the row
row - the black/white pixel data of the row
hints - decode hints
Returns:
Result containing encoded string and start/end of barcode
Throws:
NotFoundException - if an error occurs or barcode cannot be found
FormatException