private static String fileDir = "/home/xdja/conf/edums_js/";private static String errorWordFilePath = "importWordErrorDetails.doc";private static String errorExcelFilePath = "importExcelErrorDetails.doc";/*** 写导入题库错误文件类容
*@paramfileDir 文件路径
*@paramfilePath 文件路径
*@paramcontent 内容
*@paramtype 文件类型 1---excel 2 word;
*@authorniugang*/
private void writerErrorFileContent(String fileDir, String filePath, Listcontent, String type) {
XWPFDocument document= newXWPFDocument();
OutputStream stream= null;
BufferedOutputStream bufferStream= null;try{
File dir= newFile(fileDir);if (!dir.exists()) {
dir.mkdirs();
}
stream= new FileOutputStream(new File(fileDir+filePath));
bufferStream= new BufferedOutputStream(stream, 1024);//创建一个段落