in backup-core/src/main/java/org/apache/iotdb/backup/core/utils/ToByteArrayUtils.java [74:101]
public static Object convertToObject(byte[] b) {
ByteArrayInputStream bis = null;
NoHeaderObjectInputStream ois = null;
try {
// 读取二进制数据并转换成对象
bis = new ByteArrayInputStream(b);
ois = new NoHeaderObjectInputStream(bis);
return ois.readObject();
} catch (ClassNotFoundException | IOException e) {
log.warn("二进制数据转回对象失败, {}", e);
} finally {
if (ois != null) {
try {
ois.close();
} catch (IOException e) {
log.error("异常信息:", e);
}
}
if (bis != null) {
try {
bis.close();
} catch (IOException e) {
log.error("异常信息:", e);
}
}
}
return null;
}