类 MatrixUtil

java.lang.Object
com.sh.wf.module.util.MatrixUtil

public class MatrixUtil extends Object

Description: 条形码工具类

Title:首亨软件 - TSS/CRM等

从以下版本开始:
2016年7月7日
  • 构造器详细资料

    • MatrixUtil

      public MatrixUtil()
  • 方法详细资料

    • toQRCodeMatrix

      public static com.google.zxing.common.BitMatrix toQRCodeMatrix(String text, int width, int height)
    • toQrcodeFile

      public boolean toQrcodeFile(String text, File file, String format)
      将指定的字符串生成二维码图片
      参数:
      text - String
      file - File
      format - String
      返回:
      boolean
    • toBufferedImage

      public static BufferedImage toBufferedImage(com.google.zxing.common.BitMatrix matrix)
      根据点矩阵生成黑白图
      参数:
      matrix - BitMatrix
      返回:
      BufferedImage
    • toBufferedImage

      public static BufferedImage toBufferedImage(com.google.zxing.common.BitMatrix matrix, String text)
      根据点矩阵生成黑白图
      参数:
      matrix - BitMatrix
      text - String
      返回:
      BufferedImage
    • toBarCodeMatrix

      public static com.google.zxing.common.BitMatrix toBarCodeMatrix(String str, int width, int height)
      将字符串编成一维条码的矩阵
      参数:
      str - String
      width - int
      height - int
      返回:
      BitMatrix
    • writeToFile

      public static void writeToFile(com.google.zxing.common.BitMatrix matrix, String format, File file) throws IOException
      根据矩阵、图片格式,生成文件
      参数:
      matrix - BitMatrix
      format - String
      file - File
      抛出:
      IOException - IOException
    • writeToStream

      public static void writeToStream(com.google.zxing.common.BitMatrix matrix, String format, OutputStream stream, String text) throws IOException
      将矩阵写入到输出流中
      参数:
      matrix - BitMatrix
      format - String
      stream - OutputStream
      text - String
      抛出:
      IOException - IOException