public String createImgFile(String pathName) {  
        File file = new File(pathName);  
        if (file.isFile() && file.exists()) {  
            file.delete();  
        }  
        try {  
            ImageIO.write(buffImg, "jpeg", file);  
        } catch (IOException e) {  
            e.printStackTrace();  
        }  
        return pathName;  
    }