Package com.wf.captcha
Class ChineseCaptcha
java.lang.Object
com.wf.captcha.base.Randoms
com.wf.captcha.base.Captcha
com.wf.captcha.base.ChineseCaptchaAbstract
com.wf.captcha.ChineseCaptcha
中文验证码
- Author:
- zuihou
-
Field Summary
Fields inherited from class com.wf.captcha.base.ChineseCaptchaAbstract
DELTAFields inherited from class com.wf.captcha.base.Captcha
chars, charType, COLOR, FONT_1, FONT_10, FONT_2, FONT_3, FONT_4, FONT_5, FONT_6, FONT_7, FONT_8, FONT_9, height, len, TYPE_DEFAULT, TYPE_NUM_AND_UPPER, TYPE_ONLY_CHAR, TYPE_ONLY_LOWER, TYPE_ONLY_NUMBER, TYPE_ONLY_UPPER, widthFields inherited from class com.wf.captcha.base.Randoms
ALPHA, CHAR_MAX_INDEX, CHAR_MIN_INDEX, LOWER_MAX_INDEX, LOWER_MIN_INDEX, NUM_MAX_INDEX, RANDOM, UPPER_MAX_INDEX, UPPER_MIN_INDEX -
Constructor Summary
ConstructorsConstructorDescriptionChineseCaptcha(int width, int height) ChineseCaptcha(int width, int height, int len) ChineseCaptcha(int width, int height, int len, Font font) -
Method Summary
Modifier and TypeMethodDescription获取图片类型booleanout(OutputStream out) 生成验证码toBase64()输出base64编码Methods inherited from class com.wf.captcha.base.ChineseCaptchaAbstract
alphaHan, alphasMethods inherited from class com.wf.captcha.base.Captcha
checkAlpha, color, color, drawBesselLine, drawBesselLine, drawLine, drawLine, drawOval, drawOval, getCharType, getFont, getHeight, getLen, getWidth, setCharType, setFont, setFont, setFont, setFont, setHeight, setLen, setWidth, text, textChar, toBase64
-
Constructor Details
-
ChineseCaptcha
public ChineseCaptcha() -
ChineseCaptcha
public ChineseCaptcha(int width, int height) -
ChineseCaptcha
public ChineseCaptcha(int width, int height, int len) -
ChineseCaptcha
-
-
Method Details
-
out
生成验证码 -
toBase64
Description copied from class:Captcha输出base64编码 -
getContentType
Description copied from class:Captcha获取图片类型- Specified by:
getContentTypein classCaptcha- Returns:
- 图片格式,MIME类型
-