protected Object getChallengeClone(Captcha captcha) {
BufferedImage challenge = (BufferedImage) captcha.getChallenge();
BufferedImage clone = new BufferedImage(challenge.getWidth(), challenge.getHeight(), challenge.getType());
clone.getGraphics().drawImage(challenge, 0, 0, clone.getWidth(), clone.getHeight(), null);
clone.getGraphics().dispose();
return clone;
} Deprecated!This method must be implemented by sublcasses and : Retrieve the challenge from the captcha Make and return a
clone of the challenge Return the clone It has be design in order to let the service dipose the challenge of the
captcha after rendering. It should be implemented for all captcha type (@see ImageCaptchaService implementations
for exemple) |