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;
}
}
效果显示: