public class QRTokener
extends java.lang.Object
| Constructor and Description |
|---|
QRTokener() |
| Modifier and Type | Method and Description |
|---|---|
DecoderResult |
decode(BitMatrix bits)
Decodes a QR Code represented as a
BitMatrix. |
DecoderResult |
decode(boolean[][] image)
Convenience method that can decode a QR Code represented as a 2D array of
booleans.
|
DecoderResult |
decode(byte[][] bytes)
Convenience method that can decode a QR Code represented as a 2D array of
booleans.
|
QRCode |
encode(java.lang.String content,
ErrorCorrectionLevel ecLevel)
encoding Content to QRCode
|
public DecoderResult decode(boolean[][] image) throws java.lang.Exception
Convenience method that can decode a QR Code represented as a 2D array of booleans. "true" is taken to mean a black module.
image - booleans representing white/black QR Code modulesjava.lang.Exception - if something wrongpublic DecoderResult decode(byte[][] bytes) throws java.lang.Exception
Convenience method that can decode a QR Code represented as a 2D array of booleans. "true" is taken to mean a black module.
bytes - bytes representing white/black QR Code modulesjava.lang.Exception - if something wrongpublic DecoderResult decode(BitMatrix bits) throws java.lang.Exception
Decodes a QR Code represented as a BitMatrix. A 1 or "true" is
taken to mean a black module.
bits - booleans representing white/black QR Code modulesjava.lang.Exception - if the QR Code cannot be decoded or if error correction failspublic QRCode encode(java.lang.String content, ErrorCorrectionLevel ecLevel)
content - text to encodeecLevel - error correction level to useQRCode