app更改

This commit is contained in:
liuyingfang
2023-12-19 09:11:25 +08:00
parent 1f10f10a7c
commit ad88ec4da3
5 changed files with 116 additions and 17 deletions

View File

@@ -93,6 +93,19 @@ public class FileUtil {
}
public static String readFile(String fileName) throws IOException {
StringBuilder fileContent = new StringBuilder();
BufferedReader br = new BufferedReader(new FileReader(fileName));
String line;
while ((line = br.readLine()) != null) {
fileContent.append(line).append(System.lineSeparator());
}
return fileContent.toString();
}
/**
* 根据文件路径读取byte[] 数组
*/