public class ImageCodeRenderer extends Object implements CodeRenderer
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
ATTR_HEIGHT |
static String |
ATTR_OUTPUT_STREAM |
static String |
ATTR_WIDTH |
| 构造器和说明 |
|---|
ImageCodeRenderer() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
doRender(OutputStream os,
String code,
int width,
int height) |
int |
getDefaultHeight() |
int |
getDefaultWidth() |
void |
render(String code,
CaptchaAttrs attrs)
输出指定验证码图片流
|
void |
setDefaultHeight(int defaultHeight) |
void |
setDefaultWidth(int defaultWidth) |
public static String ATTR_OUTPUT_STREAM
public static String ATTR_WIDTH
public static String ATTR_HEIGHT
public void render(String code, CaptchaAttrs attrs) throws CaptchaException
CodeRendererrender 在接口中 CodeRenderercode - 验证码值attrs - 附加属性CaptchaException - 异常public void doRender(OutputStream os, String code, int width, int height) throws IOException
IOExceptionpublic int getDefaultWidth()
public void setDefaultWidth(int defaultWidth)
public int getDefaultHeight()
public void setDefaultHeight(int defaultHeight)
Copyright © 2024. All rights reserved.