类 VerifyCodeUtils

java.lang.Object
com.cdkjframework.util.make.VerifyCodeUtils

public class VerifyCodeUtils extends Object
  • 构造器详细资料

    • VerifyCodeUtils

      public VerifyCodeUtils()
  • 方法详细资料

    • outputVerifyImage

      public static String outputVerifyImage(int w, int h, File outputFile, int verifySize) throws IOException
      生成随机验证码文件,并返回验证码值
      参数:
      w - 宽度
      h - 高度
      outputFile - 输出文件
      verifySize - 验证码大小
      返回:
      返回结果
      抛出:
      IOException - IO 异常
    • outputVerifyImage

      public static String outputVerifyImage(int w, int h, OutputStream os, int verifySize) throws IOException
      输出随机验证码图片流,并返回验证码值
      参数:
      w - 宽度
      h - 高度
      os - 输出流
      verifySize - 验证码大小
      返回:
      返回结果
      抛出:
      IOException - IO 异常
    • outputImage

      public static void outputImage(int w, int h, File outputFile, String code) throws IOException
      生成指定验证码图像文件
      参数:
      w - 宽度
      h - 高度
      outputFile - 输出文件
      code - 验证码值
      抛出:
      IOException - IO 异常
    • outputImage

      public static void outputImage(int w, int h, OutputStream os, String code) throws IOException
      输出指定验证码图片流
      参数:
      w - 宽度
      h - 高度
      os - 输出流
      code - 验证码值
      抛出:
      IOException - IO 异常
    • main

      public static void main(String[] args) throws IOException
      抛出:
      IOException