nl.captcha.audio
Class AudioCaptcha

java.lang.Object
  extended by nl.captcha.audio.AudioCaptcha

public final class AudioCaptcha
extends java.lang.Object

A builder for generating a CAPTCHA audio/answer pair.

Example for generating a new CAPTCHA:

 AudioCaptcha ac = new AudioCaptcha.Builder()
   .addAnswer()
   .addNoise()
   .build();
 

Note that the build() method must always be called last. Other methods are optional.

Author:
James Childers

Nested Class Summary
static class AudioCaptcha.Builder
           
 
Field Summary
static java.lang.String NAME
           
 
Method Summary
 java.lang.String getAnswer()
           
 Sample getChallenge()
           
 boolean isCorrect(java.lang.String answer)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NAME

public static final java.lang.String NAME
See Also:
Constant Field Values
Method Detail

isCorrect

public boolean isCorrect(java.lang.String answer)

getAnswer

public java.lang.String getAnswer()

getChallenge

public Sample getChallenge()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2010-2011 James Childers. All Rights Reserved.