Class QREncoder


  • public class QREncoder
    extends Object
    • Field Detail

      • version

        public int version
      • size

        public int size
      • errorCorrectionLevel

        public com.google.zxing.qrcode.decoder.ErrorCorrectionLevel errorCorrectionLevel
      • encodedData

        public byte[][] encodedData
    • Constructor Detail

      • QREncoder

        public QREncoder()
      • QREncoder

        public QREncoder​(int version,
                         int size,
                         int errorLevel)
    • Method Detail

      • encodeQRData

        public boolean encodeQRData​(String data)
      • getEncodedQRMetrix

        public byte[][] getEncodedQRMetrix()
      • getCompatibleVersion

        public static int getCompatibleVersion​(int dataLength,
                                               int errorCorrectionLevel)
                                        throws QREncoderException
        Parameters:
        dataLength - - Size of the data to be encoded in QR Code.
        errorCorrectionLevel - - Required error correction level.
        Returns:
        integer with QR Size value
        Throws:
        QREncoderException - in case of mismatch of QR data and version.
      • test

        public static void test​(String[] args)