|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object captcha.ZipBinaryImageCaptchaGenerator
public class ZipBinaryImageCaptchaGenerator
This class creates zipped binary image captchas (the embedded text is visible on an image in our own binary image format).
Field Summary | |
---|---|
private static java.lang.String |
CAPTCHA_DATA_FORMAT
This is the format of the captcha data. |
private static java.lang.String |
DEFAULT_FONT
This is the font for drawing the text. |
private int |
m_height
Stores the height in pixels all generated images will have. |
private int |
m_width
Stores the width in pixels all generated images will have. |
private static java.lang.String |
VALID_TEXT_CHARACTERS
This is the string of valid captcha characters. |
Constructor Summary | |
---|---|
ZipBinaryImageCaptchaGenerator(int a_width,
int a_height)
Creates a new instance of ZipBinaryImageCaptchaGenerator. |
Method Summary | |
---|---|
java.lang.String |
createCaptcha(java.lang.String a_embeddedText)
Creates a new zipped binary image captcha and returns the image as Base64 encoded String. |
private java.awt.Image |
generateCaptchaImage(java.lang.String a_embeddedText)
Creates a captcha image, which shows the specified text. |
java.lang.String |
getCaptchaDataFormat()
Returns the format of the captcha data (ZIP_BINARY_IMAGE). |
int |
getMaximumStringLength()
Returns the maximum number of characters of the captcha generators alphabet, which are supported as input when creating a captcha. |
java.lang.String |
getValidCharacters()
Returns the string of valid captcha characters. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.lang.String DEFAULT_FONT
private static final java.lang.String VALID_TEXT_CHARACTERS
private static final java.lang.String CAPTCHA_DATA_FORMAT
private int m_width
private int m_height
Constructor Detail |
---|
public ZipBinaryImageCaptchaGenerator(int a_width, int a_height)
a_width
- The width in pixels all generated images will have.a_height
- The height in pixels all generated images will have.Method Detail |
---|
public java.lang.String createCaptcha(java.lang.String a_embeddedText) throws java.lang.Exception
createCaptcha
in interface ICaptchaGenerator
a_embeddedText
- The text which shall be visible in the zipped binary image.
java.lang.Exception
public java.lang.String getValidCharacters()
getValidCharacters
in interface ICaptchaGenerator
public java.lang.String getCaptchaDataFormat()
getCaptchaDataFormat
in interface ICaptchaGenerator
public int getMaximumStringLength()
getMaximumStringLength
in interface ICaptchaGenerator
private java.awt.Image generateCaptchaImage(java.lang.String a_embeddedText) throws java.lang.Exception
a_embeddedText
- The text, which shall be visible on the captcha image.
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |