百度asr应用
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
684 B

5 months ago
  1. package com.bw.asr.utils;
  2. import java.io.FileWriter;
  3. import java.io.IOException;
  4. import java.util.ArrayList;
  5. import java.util.HashMap;
  6. import java.util.HashSet;
  7. import java.util.List;
  8. import java.util.Map;
  9. import java.util.Set;
  10. /**
  11. * 文件工具类
  12. * @author jian.mao
  13. * @date 2023年7月14日
  14. * @description
  15. */
  16. public class FileUtil {
  17. /**
  18. * 数据写入文件
  19. * @param Path 文件路径
  20. * @param result 数据
  21. * @throws IOException
  22. */
  23. public static void writeFile(String path,String result){
  24. try {
  25. FileWriter fw = new FileWriter(path,true);
  26. fw.write(result+"\n");
  27. fw.flush();
  28. fw.close();
  29. } catch (Exception e) {
  30. e.printStackTrace();
  31. }
  32. }
  33. }