基于SSH框架下登录验证码模块的实现(3)

public void write(String path) throws IOException {
        OutputStream sos = new FileOutputStream(path);
        this.write((OutputStream)sos);
    }

public void write(OutputStream sos) throws IOException {
        ImageIO.write(this.buffImg, "png", sos);
        sos.close();
    }

public BufferedImage getBuffImg() {
        return this.buffImg;
    }

public String getCode() {
        return this.code;
    }
}

效果显示:

基于SSH框架下登录验证码模块的实现

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/a440ad15973da4ee69959d808a0b4123.html