mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
fix doc
This commit is contained in:
parent
b811dab681
commit
2602f91327
@ -1,5 +1,13 @@
|
|||||||
package cn.hutool.captcha;
|
package cn.hutool.captcha;
|
||||||
|
|
||||||
|
import cn.hutool.captcha.generator.CodeGenerator;
|
||||||
|
import cn.hutool.captcha.generator.RandomGenerator;
|
||||||
|
import cn.hutool.core.codec.Base64;
|
||||||
|
import cn.hutool.core.img.ImgUtil;
|
||||||
|
import cn.hutool.core.io.FileUtil;
|
||||||
|
import cn.hutool.core.io.IORuntimeException;
|
||||||
|
import cn.hutool.core.io.IoUtil;
|
||||||
|
|
||||||
import java.awt.AlphaComposite;
|
import java.awt.AlphaComposite;
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.awt.Font;
|
import java.awt.Font;
|
||||||
@ -10,42 +18,51 @@ import java.io.File;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
|
|
||||||
import cn.hutool.captcha.generator.CodeGenerator;
|
|
||||||
import cn.hutool.captcha.generator.RandomGenerator;
|
|
||||||
import cn.hutool.core.codec.Base64;
|
|
||||||
import cn.hutool.core.img.ImgUtil;
|
|
||||||
import cn.hutool.core.io.FileUtil;
|
|
||||||
import cn.hutool.core.io.IORuntimeException;
|
|
||||||
import cn.hutool.core.io.IoUtil;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 抽象验证码<br>
|
* 抽象验证码<br>
|
||||||
* 抽象验证码实现了验证码字符串的生成、验证,验证码图片的写出<br>
|
* 抽象验证码实现了验证码字符串的生成、验证,验证码图片的写出<br>
|
||||||
* 实现类通过实现{@link #createImage(String)} 方法生成图片对象
|
* 实现类通过实现{@link #createImage(String)} 方法生成图片对象
|
||||||
*
|
*
|
||||||
* @author looly
|
* @author looly
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public abstract class AbstractCaptcha implements ICaptcha {
|
public abstract class AbstractCaptcha implements ICaptcha {
|
||||||
private static final long serialVersionUID = 3180820918087507254L;
|
private static final long serialVersionUID = 3180820918087507254L;
|
||||||
|
|
||||||
/** 图片的宽度 */
|
/**
|
||||||
|
* 图片的宽度
|
||||||
|
*/
|
||||||
protected int width;
|
protected int width;
|
||||||
/** 图片的高度 */
|
/**
|
||||||
|
* 图片的高度
|
||||||
|
*/
|
||||||
protected int height;
|
protected int height;
|
||||||
/** 验证码干扰元素个数 */
|
/**
|
||||||
|
* 验证码干扰元素个数
|
||||||
|
*/
|
||||||
protected int interfereCount;
|
protected int interfereCount;
|
||||||
/** 字体 */
|
/**
|
||||||
|
* 字体
|
||||||
|
*/
|
||||||
protected Font font;
|
protected Font font;
|
||||||
/** 验证码 */
|
/**
|
||||||
|
* 验证码
|
||||||
|
*/
|
||||||
protected String code;
|
protected String code;
|
||||||
/** 验证码图片 */
|
/**
|
||||||
|
* 验证码图片
|
||||||
|
*/
|
||||||
protected byte[] imageBytes;
|
protected byte[] imageBytes;
|
||||||
/** 验证码生成器 */
|
/**
|
||||||
|
* 验证码生成器
|
||||||
|
*/
|
||||||
protected CodeGenerator generator;
|
protected CodeGenerator generator;
|
||||||
/** 背景色 */
|
/**
|
||||||
|
* 背景色
|
||||||
|
*/
|
||||||
protected Color background;
|
protected Color background;
|
||||||
/** 文字透明度 */
|
/**
|
||||||
|
* 文字透明度
|
||||||
|
*/
|
||||||
protected AlphaComposite textAlpha;
|
protected AlphaComposite textAlpha;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -99,6 +116,7 @@ public abstract class AbstractCaptcha implements ICaptcha {
|
|||||||
* 根据生成的code创建验证码图片
|
* 根据生成的code创建验证码图片
|
||||||
*
|
*
|
||||||
* @param code 验证码
|
* @param code 验证码
|
||||||
|
* @return Image
|
||||||
*/
|
*/
|
||||||
protected abstract Image createImage(String code);
|
protected abstract Image createImage(String code);
|
||||||
|
|
||||||
|
@ -415,6 +415,7 @@ public class Scheduler implements Serializable {
|
|||||||
* 停止定时任务<br>
|
* 停止定时任务<br>
|
||||||
* 此方法调用后会将定时器进程立即结束,如果为守护线程模式,则正在执行的作业也会自动结束,否则作业线程将在执行完成后结束。
|
* 此方法调用后会将定时器进程立即结束,如果为守护线程模式,则正在执行的作业也会自动结束,否则作业线程将在执行完成后结束。
|
||||||
*
|
*
|
||||||
|
* @param clearTasks 是否清除说有任务
|
||||||
* @return this
|
* @return this
|
||||||
* @since 4.1.17
|
* @since 4.1.17
|
||||||
*/
|
*/
|
||||||
|
@ -180,6 +180,7 @@ public class MultipartRequestInputStream extends BufferedInputStream {
|
|||||||
* 跳过边界表示
|
* 跳过边界表示
|
||||||
*
|
*
|
||||||
* @return 跳过的字节数
|
* @return 跳过的字节数
|
||||||
|
* @throws IOException 读取异常
|
||||||
*/
|
*/
|
||||||
public int skipToBoundary() throws IOException {
|
public int skipToBoundary() throws IOException {
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user