二进制流保存到文件/二进制流浏览器输入文件 /**********此段代码是把二进制流byte[]生成文件 START******************/ epolicyPdfSavePath=getEpolicyPdfSavePath(); if (epolicyPdfSavePath != null && !epolicyPdfSavePath.endsWith(File.separator)) { epolicyPdfSavePath = epolicyPdfSavePath + File.separator; } //文件子路径 String filePath = ePolicyBean.getId(); //以文件名保存 String path = epolicyPdfSavePath + File.separator + filePath; File actSavedFilePath = new File(path); // 如果路径不存在,则创建文件夹 if (!actSavedFilePath.exists()) { try { FileUtils.forceMkdir(actSavedFilePath); } catch (IOException e) { e.printStackTrace(); } } String fileName = ePolicyBean.getId() +"."+ "pdf"; String fullPath = actSavedFilePath + File.separator + fileName; //文件流 byte[] pdfFile = ePolicyBean.getPdfFile(); log.debug("pdf生