政企WPS
This commit is contained in:
@ -293,15 +293,15 @@ public class WpsController {
|
|||||||
String fileName = fileIdName;
|
String fileName = fileIdName;
|
||||||
String text = " ";
|
String text = " ";
|
||||||
byte buf[] = text.getBytes();
|
byte buf[] = text.getBytes();
|
||||||
// try {
|
try {
|
||||||
//// URL crt = test.class.getClassLoader().getResource("text.doc");
|
File tempFile = File.createTempFile("tempDoc", ".doc");
|
||||||
//// File file = new File(crt.getPath());
|
BufferedInputStream bis = new BufferedInputStream(new FileInputStream(tempFile));
|
||||||
//// BufferedInputStream bis = new BufferedInputStream(new FileInputStream(file));
|
buf = IOUtils.toByteArray(bis);
|
||||||
//// buf = IOUtils.toByteArray(bis);
|
tempFile.deleteOnExit();
|
||||||
// }catch (Exception e){
|
}catch (Exception e){
|
||||||
// log.error("读取异常",e);
|
log.error("读取异常",e);
|
||||||
// CommonExceptionEnum.FRAME_EXCEPTION_COMMON_DATA_OTHER_ERROR.customValidName("模板文件读取异常",true);
|
CommonExceptionEnum.FRAME_EXCEPTION_COMMON_DATA_OTHER_ERROR.customValidName("模板文件读取异常",true);
|
||||||
// }
|
}
|
||||||
|
|
||||||
String fileLength = String.valueOf(buf.length);
|
String fileLength = String.valueOf(buf.length);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user