| 限定符和类型 | 字段和说明 |
|---|---|
protected int |
height |
protected HashMap<com.google.zxing.EncodeHintType,Object> |
hints |
protected ImageType |
imageType |
protected com.google.zxing.Writer |
qrWriter |
protected int |
width |
| 构造器和说明 |
|---|
AbstractQRCode() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected com.google.zxing.common.BitMatrix |
createMatrix(String text) |
protected File |
createTempFile() |
protected File |
createTempFile(String name) |
abstract File |
file()
returns a
File representation of the QR code. |
abstract File |
file(String name)
returns a
File representation of the QR code. |
com.google.zxing.Writer |
getQrWriter() |
void |
setQrWriter(com.google.zxing.Writer qrWriter) |
ByteArrayOutputStream |
stream()
returns a
ByteArrayOutputStream representation of the QR code |
void |
writeTo(OutputStream stream)
writes a representation of the QR code to the supplied
OutputStream |
protected abstract void |
writeToStream(OutputStream stream) |
protected com.google.zxing.Writer qrWriter
protected int width
protected int height
protected ImageType imageType
public abstract File file()
File representation of the QR code. The file is set to be deleted on exit (i.e. File.deleteOnExit()). If you want the file to live beyond the life of the jvm process, you should make a copy.public abstract File file(String name)
File representation of the QR code. The file has the given name. The file is set to be deleted on exit
(i.e. File.deleteOnExit()). If you want the file to live beyond the life of the jvm process, you should
make a copy.name - name of the created filefile()public ByteArrayOutputStream stream()
ByteArrayOutputStream representation of the QR codepublic void writeTo(OutputStream stream)
OutputStreamstream - the OutputStream to write QR Code toprotected abstract void writeToStream(OutputStream stream) throws IOException, com.google.zxing.WriterException
IOExceptioncom.google.zxing.WriterExceptionprotected com.google.zxing.common.BitMatrix createMatrix(String text) throws com.google.zxing.WriterException
com.google.zxing.WriterExceptionprotected File createTempFile() throws IOException
IOExceptionprotected File createTempFile(String name) throws IOException
IOExceptionpublic com.google.zxing.Writer getQrWriter()
public void setQrWriter(com.google.zxing.Writer qrWriter)
Copyright © 2019. All rights reserved.