public class ImageCaptcha extends Object
| 构造器和说明 |
|---|
ImageCaptcha() |
ImageCaptcha(int width,
int height) |
ImageCaptcha(int width,
int height,
int len) |
ImageCaptcha(int width,
int height,
int len,
Font font) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected char[] |
alphas()
生成随机字符数组
|
protected Color |
color(int fc,
int bc)
给定范围获得随机颜色
|
Font |
getFont() |
int |
getHeight() |
int |
getLen() |
int |
getWidth() |
BufferedImage |
graphicsImage(String strs)
画随机码图
|
void |
out(OutputStream out)
生成验证码
|
void |
out(OutputStream os,
String text) |
void |
setFont(Font font) |
void |
setHeight(int height) |
void |
setLen(int len) |
void |
setWidth(int width) |
String |
text()
获取随机字符串
|
public ImageCaptcha()
public ImageCaptcha(int width,
int height)
public ImageCaptcha(int width,
int height,
int len)
public ImageCaptcha(int width,
int height,
int len,
Font font)
public void out(OutputStream out)
IOException - IO异常public BufferedImage graphicsImage(String strs)
strs - 文本public void out(OutputStream os, String text)
protected char[] alphas()
public Font getFont()
public void setFont(Font font)
public int getLen()
public void setLen(int len)
public int getWidth()
public void setWidth(int width)
public int getHeight()
public void setHeight(int height)
protected Color color(int fc, int bc)
public String text()
Copyright © 2023. All rights reserved.