com.octo.captcha.module.web.sound
Class SoundToWavHelper

java.lang.Object
  extended by com.octo.captcha.module.web.sound.SoundToWavHelper

public class SoundToWavHelper
extends java.lang.Object

Helper class


Constructor Summary
SoundToWavHelper()
           
 
Method Summary
static void flushNewCaptchaToResponse(HttpServletRequest theRequest, HttpServletResponse theResponse, Logger log, SoundCaptchaService service, java.lang.String id, java.util.Locale locale)
          retrieve a new SoundCaptcha using SoundCaptchaService and flush it to the response.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SoundToWavHelper

public SoundToWavHelper()
Method Detail

flushNewCaptchaToResponse

public static void flushNewCaptchaToResponse(HttpServletRequest theRequest,
                                             HttpServletResponse theResponse,
                                             Logger log,
                                             SoundCaptchaService service,
                                             java.lang.String id,
                                             java.util.Locale locale)
                                      throws java.io.IOException
retrieve a new SoundCaptcha using SoundCaptchaService and flush it to the response.
Captcha are localized using request locale.
This method returns a 404 to the client instead of the image if the request isn't correct (missing parameters, etc...)..
The log may be null.

Parameters:
theRequest - the request
theResponse - the response
log - a commons logger
service - an SoundCaptchaService instance
Throws:
java.io.IOException - if a problem occurs during the jpeg generation process


Copyright 2003-2009 JCaptcha. All Rights Reserved.