boolean
needCompress) throws Exception {
BufferedImage image = QRCodeUtil.createImage(content, imgPath,
needCompress);
mkdirs(destPath);
String file
= new Random().nextInt(99999999)+\
ImageIO.write(image, FORMAT_NAME, new File(destPath+\ }
public
static void mkdirs(String destPath) { File file =new
File(destPath);
//ļвʱmkdirsԶĿ¼mkdir(mkdirĿ¼׳쳣)
if
(!file.exists() && !file.isDirectory()) { file.mkdirs(); } }
public
static void encode(String content, String imgPath, String destPath) throws Exception {
QRCodeUtil.encode(content, imgPath, destPath, false); }
public
static void encode(String content, String destPath,
boolean
needCompress) throws Exception {
QRCodeUtil.encode(content, null, destPath, needCompress); }