public class QRCode extends AbstractQRCode
| Modifier and Type | Method and Description |
|---|---|
File |
file() |
File |
file(String name) |
static QRCode |
from(String text)
Create a QR code from the given text.
|
static AbstractQRCode |
from(VCard vcard)
Creates a a QR Code from the given
VCard. |
protected void |
writeToStream(OutputStream stream) |
createMatrix, createTempFile, createTempFile, getQrWriter, setQrWriter, stream, to, withCharset, withErrorCorrection, withHint, withSize, writeToprotected final String text
protected QRCode(String text)
public static QRCode from(String text)
AbstractQRCode.to(net.glxn.qrgen.core.image.ImageType) e.g. QRCode.from("hello world").to(JPG) AbstractQRCode.withSize(int, int) e.g. QRCode.from("hello world").to(JPG).withSize(125, 125) text - the text to encode to a new QRCode, this may fail if the text is too large. public static AbstractQRCode from(VCard vcard)
VCard.
The QRCode will have the following defaults: vcard - the vcard to encode as QRCodepublic File file()
file in class AbstractQRCodepublic File file(String name)
file in class AbstractQRCodeprotected void writeToStream(OutputStream stream) throws IOException, com.google.zxing.WriterException
writeToStream in class AbstractQRCodeIOExceptioncom.google.zxing.WriterExceptionCopyright © 2014. All Rights Reserved.