API Overview API Index Package Overview Direct link to this page
JavaOnTracks 0.1.2
  net.jot.captcha. JOTCaptchaGeneratorInterface View Javadoc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41

/*
------------------------------------
JavaOnTracks          Thibaut Colar
tcolar-jot AT colar DOT net
Artistic Licence 2.0
http://www.javaontracks.net
------------------------------------
 */
package net.jot.captcha;

import java.io.File;
import javax.servlet.http.HttpServletResponse;
import net.jot.image.JOTAbstractImageWriterInterface;

/**
 *
 * @author thibautc
 */
public interface JOTCaptchaGeneratorInterface {
    /**
     * Creates a captcha image
     * Return captcha code
     * @param writer
     * @param imageFile
     * @throws java.lang.Exception
     */
    public String writeToFile(JOTAbstractImageWriterInterface writer, File imageFile) throws Exception;

    /**
     * Return a string contatining all the possible chars that can might be in the captcha
     */
    public String getChars();
    
    /**
     * Sends the captchca straight to the browser (sets headers etc..).
     * Note that it will close(commit) the response.
     * ex: writeBrowser(writer,responset,"CAPTCHA_CODE");
     * returns the captcha code.
     */
    public String writeToBrowser(JOTAbstractImageWriterInterface writer, HttpServletResponse response) throws Exception;
}

Generated By: JavaOnTracks Doclet 0.1.5     ©Thibaut Colar