anon.util.captcha
Interface IImageEncodedCaptcha

All Known Implementing Classes:
ZipBinaryImageCaptchaClient

public interface IImageEncodedCaptcha

This defines some methods, every image based captcha for JAP has to implement.


Method Summary
 int getCharacterNumber()
          Returns the number of characters which are included in the captcha.
 java.lang.String getCharacterSet()
          Returns the character set which was used when the captcha was created.
 java.awt.Image getImage()
          Returns the image with the captcha data.
 byte[] solveCaptcha(java.lang.String a_key, byte[] a_startsWith)
          Tries to solve the captcha and returns a byte array with the contents.
 

Method Detail

getImage

java.awt.Image getImage()
Returns the image with the captcha data.


getCharacterSet

java.lang.String getCharacterSet()
Returns the character set which was used when the captcha was created. Only characters from this set are in the captcha image.


getCharacterNumber

int getCharacterNumber()
Returns the number of characters which are included in the captcha.


solveCaptcha

byte[] solveCaptcha(java.lang.String a_key,
                    byte[] a_startsWith)
                    throws java.lang.Exception
Tries to solve the captcha and returns a byte array with the contents. If the captcha could not be solved, null is returned.

Parameters:
a_key - String
a_startsWith - byte[]
Returns:
byte[]
Throws:
java.lang.Exception