高级算法特征值,暂降事件范围分析代码提交
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
package com.njcn.advance.utils;
|
||||
|
||||
import cn.hutool.core.io.IoUtil;
|
||||
import cn.hutool.core.util.CharsetUtil;
|
||||
import com.njcn.event.api.RmpEventDetailFeignClient;
|
||||
import com.njcn.oss.utils.FileStorageUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
/**
|
||||
* pqs
|
||||
* 波形操作工具类
|
||||
* @author cdf
|
||||
* @date 2023/8/1
|
||||
*/
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class WaveUtils {
|
||||
|
||||
private final FileStorageUtil fileStorageUtil;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 读取文件服务器波形数据
|
||||
* @author cdf
|
||||
* @date 2023/8/1
|
||||
*/
|
||||
public String getFile(String filePath){
|
||||
String temJson = null;
|
||||
try(InputStream inputStream = fileStorageUtil.getFileStream(filePath)){
|
||||
temJson = IoUtil.read(inputStream, CharsetUtil.UTF_8);
|
||||
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return temJson;
|
||||
}
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user