Package io.itpl.qss.encoder
Class QREncoder
- java.lang.Object
-
- io.itpl.qss.encoder.QREncoder
-
public class QREncoder extends Object
-
-
Field Summary
Fields Modifier and Type Field Description byte[][]encodedDatacom.google.zxing.qrcode.decoder.ErrorCorrectionLevelerrorCorrectionLevelstatic intMAX_DATA_CAPACITYstatic intMAX_VERSIONstatic intMIN_VERSIONintsizeintversion
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanencodeQRData(String data)static intgetCompatibleVersion(int dataLength, int errorCorrectionLevel)byte[][]getEncodedQRMetrix()static voidtest(String[] args)
-
-
-
Field Detail
-
version
public int version
-
size
public int size
-
errorCorrectionLevel
public com.google.zxing.qrcode.decoder.ErrorCorrectionLevel errorCorrectionLevel
-
encodedData
public byte[][] encodedData
-
MAX_DATA_CAPACITY
public static final int MAX_DATA_CAPACITY
- See Also:
- Constant Field Values
-
MIN_VERSION
public static final int MIN_VERSION
- See Also:
- Constant Field Values
-
MAX_VERSION
public static final int MAX_VERSION
- See Also:
- Constant Field Values
-
-
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)
-
-