Package com.wf.captcha
Class GifCaptcha
java.lang.Object
com.wf.captcha.base.Randoms
com.wf.captcha.base.Captcha
com.wf.captcha.GifCaptcha
Gif验证码类
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
ConstructorsConstructorDescriptionGifCaptcha(int width, int height) GifCaptcha(int width, int height, int len) GifCaptcha(int width, int height, int len, Font font) -
Method Summary
Modifier and TypeMethodDescription获取图片类型booleanout(OutputStream os) 验证码输出,抽象方法,由子类实现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
-
GifCaptcha
public GifCaptcha() -
GifCaptcha
public GifCaptcha(int width, int height) -
GifCaptcha
public GifCaptcha(int width, int height, int len) -
GifCaptcha
-
-
Method Details
-
out
Description copied from class:Captcha验证码输出,抽象方法,由子类实现 -
toBase64
Description copied from class:Captcha输出base64编码 -
getContentType
Description copied from class:Captcha获取图片类型- Specified by:
getContentTypein classCaptcha- Returns:
- 图片格式,MIME类型
-