public void saveFile(Object obj, File file) {
        if (file.exists()) {
            String dirs = file.getPath();
            file.delete();
            this.createNewFile(file, dirs);
        }
        try {
            this.obj = obj;
            this.file = file;
            this.saveFile(obj, file);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }