日常记录
双眼模糊只为你
一起交流,相互学习,共同进步!
展开
-
解决nio中文乱码问题
解决nio中文乱码问题public class TestChannel { public static void main(String[] args) throws Exception { charChannel(); } public static void charChannel() throws Exception { RandomAccessFile raf = new RandomAccessFile("C:\\Users\\Docum原创 2020-11-16 23:49:36 · 286 阅读 · 0 评论 -
文件打包和下载
目录一、递归获取指定目录下的文件二、批量文件打包三、文件下载四、调用示例一、递归获取指定目录下的文件/** * 递归获取指定目录下的所有文件 * * @param parentPath 指定的目录 * @return 指定的目录下的所有文件集合 */ public static List<File> getFilePaths(File parentPath) { List<File> fileList =原创 2020-10-16 21:11:00 · 163 阅读 · 0 评论