code: public static synchronized void saveFile(File file, String content, boolean append) throws IOException {
          if (Checker.isNotNull(file)) {
              if (!file.exists()) {
                  file.createNewFile();
              }
              try (BufferedWriter out = new BufferedWriter(new FileWriter(file, append))) {
                  out.write(content);
              }
              logger.info("save file '" + file.getAbsolutePath() + "' success");
          }
      }
docs: 保存文件
  
  @param file 文件
  @param content 内容
  @param append 保存方式
  
  @throws IOException 异常