railo.commons.img
Class Captcha

java.lang.Object
  extended by railo.commons.img.AbstractCaptcha
      extended by railo.commons.img.Captcha

public final class Captcha
extends AbstractCaptcha

concrete captcha implementation


Field Summary
 
Fields inherited from class railo.commons.img.AbstractCaptcha
DIFFICULTY_HIGH, DIFFICULTY_LOW, DIFFICULTY_MEDIUM
 
Constructor Summary
Captcha()
           
 
Method Summary
 Font getFont(String font, Font defaultValue)
          creates a font from given string
static String randomString(int length)
          creates a random String in given length
static void writeOut(BufferedImage image, OutputStream os, String format)
          write out image object to a output stream
 
Methods inherited from class railo.commons.img.AbstractCaptcha
generate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Captcha

public Captcha()
Method Detail

getFont

public Font getFont(String font,
                    Font defaultValue)
Description copied from class: AbstractCaptcha
creates a font from given string

Specified by:
getFont in class AbstractCaptcha
Returns:
See Also:
AbstractCaptcha.getFont(java.lang.String, java.awt.Font)

writeOut

public static void writeOut(BufferedImage image,
                            OutputStream os,
                            String format)
                     throws IOException
write out image object to a output stream

Parameters:
image -
os -
format -
Throws:
IOException

randomString

public static String randomString(int length)
creates a random String in given length

Parameters:
length - length of the string to create
Returns:


Copyright © 2012 Railo