Browse Source

/*去掉红外功能在x86上运行失败的代码;*/

master
htjcAdmin 8 months ago
parent
commit
08d267ccfa
4 changed files with 220 additions and 219 deletions
  1. +10
    -10
      src/main/java/com/inspect/simulator/controller/InfraredController.java
  2. +3
    -2
      src/main/java/com/inspect/simulator/hikVision/utils/jna/HikLibConfig.java
  3. +3
    -3
      src/main/java/com/inspect/simulator/service/HikVisionService.java
  4. +204
    -204
      src/main/java/com/inspect/simulator/service/impl/HikVisionServiceImpl.java

+ 10
- 10
src/main/java/com/inspect/simulator/controller/InfraredController.java View File

@ -23,11 +23,11 @@ public class InfraredController {
* password 密码
* account 账号
*/
@PostMapping("/login")
@ResponseBody
public void login(@RequestBody NvrInfo nvrInfo) {
hikVisionService.login(nvrInfo);
}
// @PostMapping("/login")
// @ResponseBody
// public void login(@RequestBody NvrInfo nvrInfo) {
// hikVisionService.login(nvrInfo);
// }
/**
* ----红外相机全屏测温抓图--海康微影----
@ -37,11 +37,11 @@ public class InfraredController {
* userName 账号
*/
@PostMapping("/cameraHongWaiHk")
@ResponseBody
public AjaxResult cameraHongWaiHk(@RequestBody Camera camera) {
return hikVisionService.cameraHongWaiHk(camera);
}
// @PostMapping("/cameraHongWaiHk")
// @ResponseBody
// public AjaxResult cameraHongWaiHk(@RequestBody Camera camera) {
// return hikVisionService.cameraHongWaiHk(camera);
// }
//图谱解析


+ 3
- 2
src/main/java/com/inspect/simulator/hikVision/utils/jna/HikLibConfig.java View File

@ -6,19 +6,20 @@ import com.inspect.simulator.service.impl.HikFExceptionCallBack_Imp;
import com.inspect.simulator.service.impl.HikLoginResultCallBack;
import com.sun.jna.Native;
import com.sun.jna.Pointer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
// SDK接口说明,HCNetSDK.dll
@Configuration
//@Configuration
public class HikLibConfig {
private static HikFExceptionCallBack_Imp fExceptionCallBack;
private static HikLoginResultCallBack fLoginCallBackImp;
// @Autowired
//@Autowired
private HCNetSDK hcNetSDK;


+ 3
- 3
src/main/java/com/inspect/simulator/service/HikVisionService.java View File

@ -8,10 +8,10 @@ import com.inspect.simulator.hikVision.utils.AjaxResult;
public interface HikVisionService {
//相机登陆
AjaxResult login(NvrInfo nvrInfo);
// AjaxResult login(NvrInfo nvrInfo);
//红外--海康相机
AjaxResult cameraHongWaiHk(Camera camera) ;
// //红外--海康相机
// AjaxResult cameraHongWaiHk(Camera camera) ;
//图谱解析
AjaxResult analyzeInfrared(Coordinate coordinate);


+ 204
- 204
src/main/java/com/inspect/simulator/service/impl/HikVisionServiceImpl.java View File

@ -45,219 +45,219 @@ import java.util.List;
@Service
public class HikVisionServiceImpl implements HikVisionService {
@Autowired
private HCNetSDK hcNetSDK;
// @Autowired
// private HCNetSDK hcNetSDK;
@Value("${file.picPath}")
@Value("${file.picPath:test}")
private String picPath;
@Override
public AjaxResult login(NvrInfo nvrInfo) {
return login_V40(nvrInfo);
}
// @Override
// public AjaxResult login(NvrInfo nvrInfo) {
// return login_V40(nvrInfo);
// }
/**
* 设备登录V40 与V30功能一致
*/
public AjaxResult login_V40(NvrInfo nvrInfo) {
HCNetSDK.NET_DVR_USER_LOGIN_INFO m_strLoginInfo = HikVisionUtils.login_V40(nvrInfo.getNvrIp(), nvrInfo.getServerPort().shortValue(), nvrInfo.getAccount(), nvrInfo.getPassword());//设备登录信息
HCNetSDK.NET_DVR_DEVICEINFO_V40 m_strDeviceInfo = new HCNetSDK.NET_DVR_DEVICEINFO_V40();//设备信息
int lUserID = hcNetSDK.NET_DVR_Login_V40(m_strLoginInfo, m_strDeviceInfo);
if (lUserID == -1) {
System.out.println("登录失败,错误码为" + hcNetSDK.NET_DVR_GetLastError());
return AjaxResult.error(hcNetSDK.NET_DVR_GetErrorMsg(new IntByReference(hcNetSDK.NET_DVR_GetLastError())));
} else {
System.out.println(":设备登录成功!" + lUserID);
// birdNvrMapper.updateNvrInfo(nvrInfo);
// redisTemplate.opsForValue().set(nvrInfo.getNvrIp() + "_userId", lUserID);
//若果设备序列号为空时即为第一次登陆写入基础数据
if (nvrInfo.getNvrSerial() == null || nvrInfo.getNvrSerial().equals("")) {
m_strDeviceInfo.read();
HCNetSDK.NET_DVR_DEVICEINFO_V30 deviceinfo_v30 = m_strDeviceInfo.struDeviceV30;
nvrInfo.setNvrSerial(StringUtils.bytetoString(deviceinfo_v30.sSerialNumber, "GB2312"));
//模拟通道不为0并且数字通道为0即为模拟通道
if (deviceinfo_v30.byChanNum != 0 && deviceinfo_v30.byIPChanNum == 0) {
nvrInfo.setChannelType(0);
nvrInfo.setChannelNumber(deviceinfo_v30.byChanNum + deviceinfo_v30.byHighDChanNum * 256);
nvrInfo.setStartChannel((int) deviceinfo_v30.byStartChan);
}
//模拟通道为0并且数字通道不为0即为数字通道
if (deviceinfo_v30.byChanNum == 0 && deviceinfo_v30.byIPChanNum != 0) {
nvrInfo.setChannelType(1);
nvrInfo.setChannelNumber(deviceinfo_v30.byIPChanNum + deviceinfo_v30.byHighDChanNum * 256);
nvrInfo.setStartChannel((int) deviceinfo_v30.byStartDChan);
}
//模拟通道不为0并且数字通道不为0即为双通道
if (deviceinfo_v30.byChanNum != 0 && deviceinfo_v30.byIPChanNum != 0) {
nvrInfo.setChannelType(2);
nvrInfo.setChannelNumber(deviceinfo_v30.byChanNum + deviceinfo_v30.byHighDChanNum * 256);
nvrInfo.setStartChannel((int) deviceinfo_v30.byStartChan);
}
nvrInfo.setCalicheNumber((int) deviceinfo_v30.byDiskNum);
nvrInfo.setCharEncodeType((int) m_strDeviceInfo.byCharEncodeType);
nvrInfo.setSyncDate(new Date());
// nvrInfoMapper.updateNvrInfo(nvrInfo);
}
return AjaxResult.success(hcNetSDK.NET_DVR_GetErrorMsg(new IntByReference(hcNetSDK.NET_DVR_GetLastError())));
}
}
@Override
public AjaxResult cameraHongWaiHk(Camera camera) {
//红外图谱信息
InfraredInfo infraredInfo = new InfraredInfo();
HCNetSDK.NET_DVR_USER_LOGIN_INFO m_strLoginInfo = HikVisionUtils.login_V40(camera.getIp(), (short) camera.getPort(), camera.getUserName(), camera.getPassword());//设备登录信息
HCNetSDK.NET_DVR_DEVICEINFO_V40 m_strDeviceInfo = new HCNetSDK.NET_DVR_DEVICEINFO_V40();//设备信息
int lUserID = hcNetSDK.NET_DVR_Login_V40(m_strLoginInfo, m_strDeviceInfo);
// int lUserID=(int)redisTemplate.opsForValue().get(nvrInfo.getNvrIp()+"_userId");
if (lUserID != 0) {
System.out.println("测温设备登录失败,错误码为" + hcNetSDK.NET_DVR_GetLastError());
return AjaxResult.error(hcNetSDK.NET_DVR_GetErrorMsg(new IntByReference(hcNetSDK.NET_DVR_GetLastError())));
} else {
String s = "";
Date date = new Date();
SimpleDateFormat sf = new SimpleDateFormat("yyyyMMddHHmmss");
String newName = sf.format(date);
SimpleDateFormat sfz = new SimpleDateFormat("yyyy");
String year = sfz.format(date);
String strURL = "POST /ISAPI/Thermal/channels/2/thermometry/jpegPicWithAppendData?format=json&subtype=0";
HCNetSDK.BYTE_ARRAY ptrUrl = new HCNetSDK.BYTE_ARRAY(1024);
System.arraycopy(strURL.getBytes(), 0, ptrUrl.byValue, 0, strURL.length());
ptrUrl.write();
HCNetSDK.BYTE_ARRAY ptrInBuffer = new HCNetSDK.BYTE_ARRAY(1024 * 1024 * 10);
ptrInBuffer.read();
String strInbuffer = "{\n" +
"\t\"JpegPicWithAppendDataParam\":\n" +
"\t{\n" +
"\t\t\"jpegPicEnabled\":\"true\",\n" +
"\t\t\"captureMode\":\"standard\",\n" +
"\t\t\"rulesOverlayEnabled\":\"true\"\n" +
"\t}\n" +
"}\n";
ptrInBuffer.byValue = strInbuffer.getBytes();
ptrInBuffer.write();
HCNetSDK.NET_DVR_XML_CONFIG_INPUT net_dvr_xml_config_input = new HCNetSDK.NET_DVR_XML_CONFIG_INPUT();
net_dvr_xml_config_input.read();
net_dvr_xml_config_input.dwSize = net_dvr_xml_config_input.size();
net_dvr_xml_config_input.lpRequestUrl = ptrUrl.getPointer();
net_dvr_xml_config_input.dwRequestUrlLen = ptrUrl.byValue.length;
net_dvr_xml_config_input.lpInBuffer = ptrInBuffer.getPointer();
net_dvr_xml_config_input.dwInBufferSize = ptrInBuffer.byValue.length;
net_dvr_xml_config_input.write();
//输出参数设置
HCNetSDK.BYTE_ARRAY ptrOutByte = new HCNetSDK.BYTE_ARRAY(1024 * 1024 * 10);
ptrOutByte.read();
HCNetSDK.BYTE_ARRAY ptrStatusByte = new HCNetSDK.BYTE_ARRAY(1024 * 1024 * 10);
ptrStatusByte.read();
HCNetSDK.NET_DVR_XML_CONFIG_OUTPUT net_dvr_xml_config_output = new HCNetSDK.NET_DVR_XML_CONFIG_OUTPUT();
net_dvr_xml_config_output.read();
net_dvr_xml_config_output.dwSize = net_dvr_xml_config_output.size();
net_dvr_xml_config_output.lpOutBuffer = ptrOutByte.getPointer();
net_dvr_xml_config_output.dwOutBufferSize = ptrOutByte.size();
net_dvr_xml_config_output.write();
if (!hcNetSDK.NET_DVR_STDXMLConfig(lUserID, net_dvr_xml_config_input, net_dvr_xml_config_output)) {
System.out.println("信息获取失败,错误号:" + hcNetSDK.NET_DVR_GetLastError());
} else {
net_dvr_xml_config_output.read();
System.out.println("获取数据");
FileOutputStream pic;
try {
String filename = picPath + "/pic/hw/";
//判断路径是否存在
File filePath = new File(filename);
if (!filePath.exists()) {
//不存在创建目录
filePath.mkdirs();
}
String picname = filename + newName + "PLAY_CELLPHONE_" + ".jpg";
pic = new FileOutputStream(picname);
//将字节写入文件
long offset = 0;
ByteBuffer buffers = net_dvr_xml_config_output.lpOutBuffer.getByteBuffer(offset, net_dvr_xml_config_output.dwReturnedXMLSize);
byte[] bytes = new byte[net_dvr_xml_config_output.dwReturnedXMLSize];
buffers.rewind();
buffers.get(bytes);
//字符串截取
String indexStr = "Content-Length:";
String str = new String(bytes, StandardCharsets.UTF_8);//定义一个字符串
int index = str.indexOf(indexStr);
/**
* 去掉以下部分
* HTTP/1.1 200 OK
* MIME-Version: 1.0
* Content-Type: multipart/form-data; boundary=boundary
*
* --boundary
* Content-Type: application/json; charset="UTF-8"
* Content-Length:
*/
System.arraycopy(bytes, index + indexStr.length(), bytes, 0, net_dvr_xml_config_output.dwReturnedXMLSize - (index + indexStr.length()));
String str1 = new String(bytes, StandardCharsets.UTF_8);//定义一个字符串
int index2 = str1.indexOf(indexStr);
/**
* 去掉以下部分
* 131
*
* {
* "JpegPictureWithAppendDataResult": {
* "channel": 2,
* "appendDataVersion": "DL/T 664-2016",
* "appendDataDataLen": 1459158
* }
* }
* --boundary
* Content-Disposition: form-data;
* Content-Type: application/octet-stream
* Content-Length:
*/
System.arraycopy(bytes, index2 + indexStr.length(), bytes, 0, net_dvr_xml_config_output.dwReturnedXMLSize - (index2 + indexStr.length()));
String str2 = new String(bytes, StandardCharsets.UTF_8);
String s1 = "\r\n\r\n";
int index3 = str2.indexOf("\r\n\r\n");
/**
* 去掉
* 1459158
*
*/
byte[] file_length_bytes = new byte[index3];
System.arraycopy(bytes, 0, file_length_bytes, 0, index3);
System.arraycopy(bytes, index3 + s1.length(), bytes, 0, net_dvr_xml_config_output.dwReturnedXMLSize - (index3 + s1.length()));
System.out.println(file_length_bytes.toString());
int file_length = Integer.parseInt(new String(file_length_bytes, StandardCharsets.UTF_8));
//解析红外图片数据
byte[] subBytes = Arrays.copyOfRange(bytes, 0, file_length);
infraredInfo = readDataHw(subBytes, null);
if (bytes != null) {
pic.write(bytes, 0, file_length);
}
//关流
pic.close();
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
return AjaxResult.success(infraredInfo);
}
// public AjaxResult login_V40(NvrInfo nvrInfo) {
//
// HCNetSDK.NET_DVR_USER_LOGIN_INFO m_strLoginInfo = HikVisionUtils.login_V40(nvrInfo.getNvrIp(), nvrInfo.getServerPort().shortValue(), nvrInfo.getAccount(), nvrInfo.getPassword());//设备登录信息
// HCNetSDK.NET_DVR_DEVICEINFO_V40 m_strDeviceInfo = new HCNetSDK.NET_DVR_DEVICEINFO_V40();//设备信息
//
// int lUserID = hcNetSDK.NET_DVR_Login_V40(m_strLoginInfo, m_strDeviceInfo);
// if (lUserID == -1) {
// System.out.println("登录失败,错误码为" + hcNetSDK.NET_DVR_GetLastError());
// return AjaxResult.error(hcNetSDK.NET_DVR_GetErrorMsg(new IntByReference(hcNetSDK.NET_DVR_GetLastError())));
// } else {
// System.out.println(":设备登录成功!" + lUserID);
//// birdNvrMapper.updateNvrInfo(nvrInfo);
//// redisTemplate.opsForValue().set(nvrInfo.getNvrIp() + "_userId", lUserID);
// //若果设备序列号为空时即为第一次登陆写入基础数据
// if (nvrInfo.getNvrSerial() == null || nvrInfo.getNvrSerial().equals("")) {
// m_strDeviceInfo.read();
// HCNetSDK.NET_DVR_DEVICEINFO_V30 deviceinfo_v30 = m_strDeviceInfo.struDeviceV30;
// nvrInfo.setNvrSerial(StringUtils.bytetoString(deviceinfo_v30.sSerialNumber, "GB2312"));
// //模拟通道不为0并且数字通道为0即为模拟通道
// if (deviceinfo_v30.byChanNum != 0 && deviceinfo_v30.byIPChanNum == 0) {
// nvrInfo.setChannelType(0);
// nvrInfo.setChannelNumber(deviceinfo_v30.byChanNum + deviceinfo_v30.byHighDChanNum * 256);
// nvrInfo.setStartChannel((int) deviceinfo_v30.byStartChan);
// }
// //模拟通道为0并且数字通道不为0即为数字通道
// if (deviceinfo_v30.byChanNum == 0 && deviceinfo_v30.byIPChanNum != 0) {
// nvrInfo.setChannelType(1);
// nvrInfo.setChannelNumber(deviceinfo_v30.byIPChanNum + deviceinfo_v30.byHighDChanNum * 256);
// nvrInfo.setStartChannel((int) deviceinfo_v30.byStartDChan);
// }
// //模拟通道不为0并且数字通道不为0即为双通道
// if (deviceinfo_v30.byChanNum != 0 && deviceinfo_v30.byIPChanNum != 0) {
// nvrInfo.setChannelType(2);
// nvrInfo.setChannelNumber(deviceinfo_v30.byChanNum + deviceinfo_v30.byHighDChanNum * 256);
// nvrInfo.setStartChannel((int) deviceinfo_v30.byStartChan);
// }
// nvrInfo.setCalicheNumber((int) deviceinfo_v30.byDiskNum);
// nvrInfo.setCharEncodeType((int) m_strDeviceInfo.byCharEncodeType);
// nvrInfo.setSyncDate(new Date());
//// nvrInfoMapper.updateNvrInfo(nvrInfo);
// }
// return AjaxResult.success(hcNetSDK.NET_DVR_GetErrorMsg(new IntByReference(hcNetSDK.NET_DVR_GetLastError())));
// }
// }
// @Override
// public AjaxResult cameraHongWaiHk(Camera camera) {
// //红外图谱信息
// InfraredInfo infraredInfo = new InfraredInfo();
//
// HCNetSDK.NET_DVR_USER_LOGIN_INFO m_strLoginInfo = HikVisionUtils.login_V40(camera.getIp(), (short) camera.getPort(), camera.getUserName(), camera.getPassword());//设备登录信息
// HCNetSDK.NET_DVR_DEVICEINFO_V40 m_strDeviceInfo = new HCNetSDK.NET_DVR_DEVICEINFO_V40();//设备信息
//
// int lUserID = hcNetSDK.NET_DVR_Login_V40(m_strLoginInfo, m_strDeviceInfo);
//// int lUserID=(int)redisTemplate.opsForValue().get(nvrInfo.getNvrIp()+"_userId");
// if (lUserID != 0) {
// System.out.println("测温设备登录失败,错误码为" + hcNetSDK.NET_DVR_GetLastError());
// return AjaxResult.error(hcNetSDK.NET_DVR_GetErrorMsg(new IntByReference(hcNetSDK.NET_DVR_GetLastError())));
// } else {
//
// String s = "";
// Date date = new Date();
// SimpleDateFormat sf = new SimpleDateFormat("yyyyMMddHHmmss");
// String newName = sf.format(date);
// SimpleDateFormat sfz = new SimpleDateFormat("yyyy");
// String year = sfz.format(date);
// String strURL = "POST /ISAPI/Thermal/channels/2/thermometry/jpegPicWithAppendData?format=json&subtype=0";
// HCNetSDK.BYTE_ARRAY ptrUrl = new HCNetSDK.BYTE_ARRAY(1024);
// System.arraycopy(strURL.getBytes(), 0, ptrUrl.byValue, 0, strURL.length());
// ptrUrl.write();
// HCNetSDK.BYTE_ARRAY ptrInBuffer = new HCNetSDK.BYTE_ARRAY(1024 * 1024 * 10);
// ptrInBuffer.read();
// String strInbuffer = "{\n" +
// "\t\"JpegPicWithAppendDataParam\":\n" +
// "\t{\n" +
// "\t\t\"jpegPicEnabled\":\"true\",\n" +
// "\t\t\"captureMode\":\"standard\",\n" +
// "\t\t\"rulesOverlayEnabled\":\"true\"\n" +
// "\t}\n" +
// "}\n";
// ptrInBuffer.byValue = strInbuffer.getBytes();
// ptrInBuffer.write();
// HCNetSDK.NET_DVR_XML_CONFIG_INPUT net_dvr_xml_config_input = new HCNetSDK.NET_DVR_XML_CONFIG_INPUT();
// net_dvr_xml_config_input.read();
// net_dvr_xml_config_input.dwSize = net_dvr_xml_config_input.size();
// net_dvr_xml_config_input.lpRequestUrl = ptrUrl.getPointer();
// net_dvr_xml_config_input.dwRequestUrlLen = ptrUrl.byValue.length;
// net_dvr_xml_config_input.lpInBuffer = ptrInBuffer.getPointer();
// net_dvr_xml_config_input.dwInBufferSize = ptrInBuffer.byValue.length;
// net_dvr_xml_config_input.write();
// //输出参数设置
// HCNetSDK.BYTE_ARRAY ptrOutByte = new HCNetSDK.BYTE_ARRAY(1024 * 1024 * 10);
// ptrOutByte.read();
// HCNetSDK.BYTE_ARRAY ptrStatusByte = new HCNetSDK.BYTE_ARRAY(1024 * 1024 * 10);
// ptrStatusByte.read();
// HCNetSDK.NET_DVR_XML_CONFIG_OUTPUT net_dvr_xml_config_output = new HCNetSDK.NET_DVR_XML_CONFIG_OUTPUT();
// net_dvr_xml_config_output.read();
// net_dvr_xml_config_output.dwSize = net_dvr_xml_config_output.size();
// net_dvr_xml_config_output.lpOutBuffer = ptrOutByte.getPointer();
// net_dvr_xml_config_output.dwOutBufferSize = ptrOutByte.size();
// net_dvr_xml_config_output.write();
// if (!hcNetSDK.NET_DVR_STDXMLConfig(lUserID, net_dvr_xml_config_input, net_dvr_xml_config_output)) {
// System.out.println("信息获取失败,错误号:" + hcNetSDK.NET_DVR_GetLastError());
// } else {
// net_dvr_xml_config_output.read();
// System.out.println("获取数据");
// FileOutputStream pic;
// try {
// String filename = picPath + "/pic/hw/";
// //判断路径是否存在
// File filePath = new File(filename);
// if (!filePath.exists()) {
// //不存在创建目录
// filePath.mkdirs();
// }
// String picname = filename + newName + "PLAY_CELLPHONE_" + ".jpg";
//
// pic = new FileOutputStream(picname);
// //将字节写入文件
// long offset = 0;
// ByteBuffer buffers = net_dvr_xml_config_output.lpOutBuffer.getByteBuffer(offset, net_dvr_xml_config_output.dwReturnedXMLSize);
// byte[] bytes = new byte[net_dvr_xml_config_output.dwReturnedXMLSize];
// buffers.rewind();
// buffers.get(bytes);
//
// //字符串截取
// String indexStr = "Content-Length:";
// String str = new String(bytes, StandardCharsets.UTF_8);//定义一个字符串
// int index = str.indexOf(indexStr);
// /**
// * 去掉以下部分
// * HTTP/1.1 200 OK
// * MIME-Version: 1.0
// * Content-Type: multipart/form-data; boundary=boundary
// *
// * --boundary
// * Content-Type: application/json; charset="UTF-8"
// * Content-Length:
// */
// System.arraycopy(bytes, index + indexStr.length(), bytes, 0, net_dvr_xml_config_output.dwReturnedXMLSize - (index + indexStr.length()));
// String str1 = new String(bytes, StandardCharsets.UTF_8);//定义一个字符串
// int index2 = str1.indexOf(indexStr);
// /**
// * 去掉以下部分
// * 131
// *
// * {
// * "JpegPictureWithAppendDataResult": {
// * "channel": 2,
// * "appendDataVersion": "DL/T 664-2016",
// * "appendDataDataLen": 1459158
// * }
// * }
// * --boundary
// * Content-Disposition: form-data;
// * Content-Type: application/octet-stream
// * Content-Length:
// */
// System.arraycopy(bytes, index2 + indexStr.length(), bytes, 0, net_dvr_xml_config_output.dwReturnedXMLSize - (index2 + indexStr.length()));
// String str2 = new String(bytes, StandardCharsets.UTF_8);
// String s1 = "\r\n\r\n";
// int index3 = str2.indexOf("\r\n\r\n");
// /**
// * 去掉
// * 1459158
// *
// */
// byte[] file_length_bytes = new byte[index3];
// System.arraycopy(bytes, 0, file_length_bytes, 0, index3);
//
// System.arraycopy(bytes, index3 + s1.length(), bytes, 0, net_dvr_xml_config_output.dwReturnedXMLSize - (index3 + s1.length()));
// System.out.println(file_length_bytes.toString());
// int file_length = Integer.parseInt(new String(file_length_bytes, StandardCharsets.UTF_8));
//
// //解析红外图片数据
// byte[] subBytes = Arrays.copyOfRange(bytes, 0, file_length);
// infraredInfo = readDataHw(subBytes, null);
//
// if (bytes != null) {
// pic.write(bytes, 0, file_length);
// }
// //关流
// pic.close();
//
// } catch (FileNotFoundException e) {
// // TODO Auto-generated catch block
// e.printStackTrace();
// } catch (IOException e) {
// // TODO Auto-generated catch block
// e.printStackTrace();
// }
//
// }
// }
// return AjaxResult.success(infraredInfo);
// }
@Override


Loading…
Cancel
Save