Class QrCodeServiceImpl
java.lang.Object
ch.tocco.nice2.templating.impl.qr.QrCodeServiceImpl
- All Implemented Interfaces:
QrCodeService
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateCodeImage
(String data, int size, boolean overlay) encodes the given data into a qr code of the given size.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ch.tocco.nice2.templating.impl.qr.QrCodeService
createCodeImage
-
Constructor Details
-
QrCodeServiceImpl
public QrCodeServiceImpl()
-
-
Method Details
-
createCodeImage
public BufferedImage createCodeImage(String data, int size, boolean overlay) throws com.google.zxing.WriterException, IOException Description copied from interface:QrCodeService
encodes the given data into a qr code of the given size. Note: This service does not ensure that the qr code is readable. if the given size is too small, the generated qr code may be unreadable.- Specified by:
createCodeImage
in interfaceQrCodeService
- Parameters:
data
- the data to encodesize
- the desired size of the generated code- Returns:
- the generated qr code image
- Throws:
com.google.zxing.WriterException
IOException
-