java.lang.Object
com.google.zxing.qrcode.decoder.FormatInformation
Encapsulates a QR Code's format information, including the data mask used and error correction level.
See DataMask- See Also:
Method Summary
Modifier and TypeMethodDescription(package private) static FormatInformationdecodeFormatInformation(int maskedFormatInfo1, int maskedFormatInfo2) to establish best match if doesn't seem to match any known patternbooleanTrue if the other object has the same error correction level and data mask.(package private) byteData mask reference decoded from format info bits.(package private) ErrorCorrectionLevelError correction level decoded from format info bits.inthashCode()Hash of the error correction level combined with the data mask.(package private) static intnumBitsDiffering(int a, int b) Counts the bits that differ between the two format info bit patterns.
Method Details
numBitsDiffering
static int numBitsDiffering(int a, int b) Counts the bits that differ between the two format info bit patterns.- Parameters:
a- first of the two format info bit patterns to compareb- second of the two format info bit patterns to compare- Returns:
- number of differing bits
decodeFormatInformation
to establish best match if doesn't seem to match any known pattern- Parameters:
maskedFormatInfo1- format info indicator, with mask still appliedmaskedFormatInfo2- second copy of same info; both are checked at the same time- Returns:
- information about the format it specifies, or
null
getErrorCorrectionLevel
ErrorCorrectionLevel getErrorCorrectionLevel()Error correction level decoded from format info bits.- Returns:
- the level selected by bits 3 and 4 of the format information
getDataMask
byte getDataMask()Data mask reference decoded from format info bits.- Returns:
- the 0-7 mask pattern reference taken from the bottom three bits
hashCode
equals