File
可乐止饱
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
文件下载--解决文件名字乱码问题
@GetMapping("download") @ResponseBody public void download(String fileName, @RequestParam(required = false) String newName, HttpServletResponse response) { String path = path; // C:\\upload\\ ...原创 2020-01-10 10:18:37 · 596 阅读 · 0 评论 -
简单加密文件
import java.io.*; public class FileEncryptUtil { /** * 密钥 */ private static final int encryptKey =0x12; /** * 加密/解密 文件 * @param srcFile 原文件 * @param encFile 加密/解密后的文件 ...原创 2019-10-29 14:52:23 · 228 阅读 · 0 评论 -
文件下载
/** * 读取配置文件 */ @Autowired private Environment environment; @GetMapping(value = "download") public void download(HttpServletResponse response, String fileName) throws IOException { String name = f...原创 2019-10-23 20:26:14 · 148 阅读 · 0 评论 -
File与MultipartFile互转
File file = new File(filePath+fileName); FileInputStream fileInputStream = new FileInputStream(file); String[] fileNameSplit = fileName.split("\\."); MultipartFile multipartFile = new MockMultipartFil...原创 2019-10-11 17:36:42 · 2509 阅读 · 0 评论
分享