@Component(value="captchaGenerator") public class DefaultCaptchaGenerator extends Object implements CaptchaGenerator
CaptchaGenerator.| Constructor and Description |
|---|
DefaultCaptchaGenerator() |
| Modifier and Type | Method and Description |
|---|---|
BufferedImage |
createCaptcha(char[] text)
Creates a captcha image of the given text.
|
int |
getHeight()
Gets the captcha image height.
|
int |
getWidth()
Gets the captcha image width.
|
void |
setup()
Sets up the captcha generator.
|
public DefaultCaptchaGenerator()
public int getWidth()
CaptchaGeneratorgetWidth in interface CaptchaGeneratorpublic int getHeight()
CaptchaGeneratorgetHeight in interface CaptchaGenerator@PostConstruct public void setup()
public BufferedImage createCaptcha(char[] text)
CaptchaGeneratorcreateCaptcha in interface CaptchaGeneratortext - the text to be shown in the captcha imageBufferedImage with the generated captchaCopyright © 2011–2016. All rights reserved.