Package com.wf.captcha
Class ArithmeticCaptcha
java.lang.Object
com.wf.captcha.base.Randoms
com.wf.captcha.base.Captcha
com.wf.captcha.base.ArithmeticCaptchaAbstract
com.wf.captcha.ArithmeticCaptcha
png格式验证码
- Author:
- Created by 王帆 on 2018-07-27 上午 10:08.
-
Field Summary
Fields 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
ConstructorsConstructorDescriptionArithmeticCaptcha(int width, int height) ArithmeticCaptcha(int width, int height, int len) ArithmeticCaptcha(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.ArithmeticCaptchaAbstract
alphas, getArithmeticString, setArithmeticStringMethods 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
-
ArithmeticCaptcha
public ArithmeticCaptcha() -
ArithmeticCaptcha
public ArithmeticCaptcha(int width, int height) -
ArithmeticCaptcha
public ArithmeticCaptcha(int width, int height, int len) -
ArithmeticCaptcha
-
-
Method Details
-
out
生成验证码 -
toBase64
Description copied from class:Captcha输出base64编码 -
getContentType
Description copied from class:Captcha获取图片类型- Specified by:
getContentTypein classCaptcha- Returns:
- 图片格式,MIME类型
-