public abstract class Generator extends Object
| 构造器和说明 |
|---|
Generator() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected char[] |
alphas()
generate the random validation strings
|
protected Color |
color(int fc,
int bc)
pick color from a random range
|
Font |
getFont() |
int |
getHeight() |
int |
getLen() |
abstract BufferedImage |
getValidCodeImage()
no result provide for gif validation code. only for PNG validation code image.
|
int |
getWidth() |
void |
setFont(Font font) |
void |
setHeight(int height) |
void |
setLen(int len) |
void |
setWidth(int width) |
String |
text()
get random validation code string as lower case
|
abstract OutputStream |
write2out(OutputStream os) |
protected Font font
protected int len
protected int width
protected int height
protected char[] alphas()
public Font getFont()
public void setFont(Font font)
public int getLen()
public void setLen(int len)
public int getWidth()
public void setWidth(int width)
public int getHeight()
public void setHeight(int height)
protected Color color(int fc, int bc)
public abstract OutputStream write2out(OutputStream os)
os - source OutputStreampublic abstract BufferedImage getValidCodeImage()
null for GIFpublic String text()
Copyright © 2017. All rights reserved.