app更改
This commit is contained in:
@@ -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[] 数组
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user