将文件暂存到主机,用于读取流
//摘要 String zy = lwxx.getZy(); //送审学号 String ssxh = lwxx.getSsxh(); byte[] bytes = new byte[0]; if (StrUtil.isNotBlank(zy)) { bytes = zy.getBytes(); } //文件名称 String name = "10423_"+ ssxh + "_ZY.txt"; //将信息暂存到本机,不写入,用于读取文件流 File file = new File(this.getClass().getResource("/").getPath() + name); FileOutputStream fos = new FileOutputStream(file); fos.write(bytes); fos.close(); InputStream is = new FileInputStream(path);
浙公网安备 33010602011771号