Interface QrCodeGenerator<T>

  • Type Parameters:
    T - the type of QR-Version

    public interface QrCodeGenerator<T>
    Interface for QR-Code-Generation
    Since:
    1.0.0
    Author:
    Urvil Joshi
    • Method Detail

      • generateQrCode

        byte[] generateQrCode​(String data,
                              T version)
                       throws QrcodeGenerationException,
                              IOException
        Method to generate QR Code
        Parameters:
        data - data to encode in the QR code
        version - QR Code version
        Returns:
        array of byte containing QR Code in PNG format
        Throws:
        QrcodeGenerationException - exceptions which may occur when encoding a QRcode using the Writer framework.
        IOException - exceptions which may occur when write to the byte stream fail
      • generateQrCodeFromBinaryData

        byte[] generateQrCodeFromBinaryData​(String data,
                                            T version)
                                     throws QrcodeGenerationException,
                                            IOException
        Method to generate QR Code
        Parameters:
        data - binary data to encode in the QR code
        version - QR Code version
        Returns:
        array of byte containing QR Code in PNG format
        Throws:
        QrcodeGenerationException - exceptions which may occur when encoding a QRcode using the Writer framework.
        IOException - exceptions which may occur when write to the byte stream fail