类 MatrixUtil
java.lang.Object
com.sh.wf.module.util.MatrixUtil
Description: 条形码工具类
Title:首亨软件 - TSS/CRM等
- 从以下版本开始:
- 2016年7月7日
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static com.google.zxing.common.BitMatrixtoBarCodeMatrix(String str, int width, int height) 将字符串编成一维条码的矩阵static BufferedImagetoBufferedImage(com.google.zxing.common.BitMatrix matrix) 根据点矩阵生成黑白图static BufferedImagetoBufferedImage(com.google.zxing.common.BitMatrix matrix, String text) 根据点矩阵生成黑白图booleantoQrcodeFile(String text, File file, String format) 将指定的字符串生成二维码图片static com.google.zxing.common.BitMatrixtoQRCodeMatrix(String text, int width, int height) static voidwriteToFile(com.google.zxing.common.BitMatrix matrix, String format, File file) 根据矩阵、图片格式,生成文件static voidwriteToStream(com.google.zxing.common.BitMatrix matrix, String format, OutputStream stream, String text) 将矩阵写入到输出流中
-
构造器详细资料
-
MatrixUtil
public MatrixUtil()
-
-
方法详细资料
-
toQRCodeMatrix
-
toQrcodeFile
将指定的字符串生成二维码图片- 参数:
text- Stringfile- Fileformat- String- 返回:
- boolean
-
toBufferedImage
根据点矩阵生成黑白图- 参数:
matrix- BitMatrix- 返回:
- BufferedImage
-
toBufferedImage
根据点矩阵生成黑白图- 参数:
matrix- BitMatrixtext- String- 返回:
- BufferedImage
-
toBarCodeMatrix
将字符串编成一维条码的矩阵- 参数:
str- Stringwidth- intheight- int- 返回:
- BitMatrix
-
writeToFile
public static void writeToFile(com.google.zxing.common.BitMatrix matrix, String format, File file) throws IOException 根据矩阵、图片格式,生成文件- 参数:
matrix- BitMatrixformat- Stringfile- File- 抛出:
IOException- IOException
-
writeToStream
public static void writeToStream(com.google.zxing.common.BitMatrix matrix, String format, OutputStream stream, String text) throws IOException 将矩阵写入到输出流中- 参数:
matrix- BitMatrixformat- Stringstream- OutputStreamtext- String- 抛出:
IOException- IOException
-