调解系统初始化版本

This commit is contained in:
gy b
2024-01-04 16:58:19 +08:00
parent 30a6a3a428
commit 04b4df2964
549 changed files with 69911 additions and 0 deletions
@@ -0,0 +1,37 @@
package com.ruoyi.util;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
/**
* 文件读取类
*/
public class FileUtil {
/**
* 获取文件内容
* @param fileName
* @return
*/
public static String readToStr(String fileName){
InputStream is = FileUtil.class.getClassLoader().getResourceAsStream(fileName);
ByteArrayOutputStream os = new ByteArrayOutputStream(2048);
byte[] buffer = new byte[1024];
String str;
try {
int length;
while((length = is.read(buffer)) != -1) {
os.write(buffer, 0, length);
}
str = os.toString("UTF-8");
} catch (IOException var5) {
throw new IllegalArgumentException("无效的密钥", var5);
}
return str;
}
}