Package com.wf.captcha
Class SpecCaptcha
java.lang.Object
com.wf.captcha.base.Randoms
com.wf.captcha.base.Captcha
com.wf.captcha.SpecCaptcha
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
ConstructorsConstructorDescriptionSpecCaptcha(int width, int height) SpecCaptcha(int width, int height, int len) SpecCaptcha(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.Captcha
alphas, 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
-
SpecCaptcha
public SpecCaptcha() -
SpecCaptcha
public SpecCaptcha(int width, int height) -
SpecCaptcha
public SpecCaptcha(int width, int height, int len) -
SpecCaptcha
-
-
Method Details
-
out
生成验证码 -
toBase64
Description copied from class:Captcha输出base64编码 -
getContentType
Description copied from class:Captcha获取图片类型- Specified by:
getContentTypein classCaptcha- Returns:
- 图片格式,MIME类型
-