Package com.google.zxing.qrcode.decoder
Class Decoder
- java.lang.Object
-
- com.google.zxing.qrcode.decoder.Decoder
-
public final class Decoder extends java.lang.ObjectThe main class which implements QR Code decoding -- as opposed to locating and extracting the QR Code from an image.
-
-
Constructor Summary
Constructors Constructor Description Decoder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DecoderResultdecode(boolean[][] image)DecoderResultdecode(boolean[][] image, java.util.Map<DecodeHintType,?> hints)Convenience method that can decode a QR Code represented as a 2D array of booleans.DecoderResultdecode(BitMatrix bits)DecoderResultdecode(BitMatrix bits, java.util.Map<DecodeHintType,?> hints)Decodes a QR Code represented as aBitMatrix.
-
-
-
Method Detail
-
decode
public DecoderResult decode(boolean[][] image) throws ChecksumException, FormatException
- Throws:
ChecksumExceptionFormatException
-
decode
public DecoderResult decode(boolean[][] image, java.util.Map<DecodeHintType,?> hints) throws ChecksumException, FormatException
Convenience method that can decode a QR Code represented as a 2D array of booleans. "true" is taken to mean a black module.
- Parameters:
image- booleans representing white/black QR Code moduleshints- decoding hints that should be used to influence decoding- Returns:
- text and bytes encoded within the QR Code
- Throws:
FormatException- if the QR Code cannot be decodedChecksumException- if error correction fails
-
decode
public DecoderResult decode(BitMatrix bits) throws ChecksumException, FormatException
- Throws:
ChecksumExceptionFormatException
-
decode
public DecoderResult decode(BitMatrix bits, java.util.Map<DecodeHintType,?> hints) throws FormatException, ChecksumException
Decodes a QR Code represented as a
BitMatrix. A 1 or "true" is taken to mean a black module.- Parameters:
bits- booleans representing white/black QR Code moduleshints- decoding hints that should be used to influence decoding- Returns:
- text and bytes encoded within the QR Code
- Throws:
FormatException- if the QR Code cannot be decodedChecksumException- if error correction fails
-
-