@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()
CaptchaGenerator
getWidth
in interface CaptchaGenerator
public int getHeight()
CaptchaGenerator
getHeight
in interface CaptchaGenerator
@PostConstruct public void setup()
public BufferedImage createCaptcha(char[] text)
CaptchaGenerator
createCaptcha
in interface CaptchaGenerator
text
- the text to be shown in the captcha imageBufferedImage
with the generated captchaCopyright © 2011–2016. All rights reserved.