随笔分类 - 自用 / 模板代码
摘要:Map.Entry<Byte, Integer> tmp = new HashMap<>(); for (Map.Entry<Byte, Integer> tmp : map.entrySet()) { System.out.println("[key="+tmp.getKey()+"]"+"[va
阅读全文
摘要:Path path = Paths.get(); byte[] bytes = Files.readAllBytes(path);
阅读全文
摘要:RandomAccessFile randomAccessFile = new RandomAccessFile("C:\\Users\\Administrator\\Desktop\\test.pdf","r"); int point = 0;//最开始 long last = 0;//最后 lo
阅读全文
摘要:byte[] buffer = new byte[1024 * 1024];//缓冲区 BufferedOutputStream bufferedOutputStream = new BufferedOutputStream( new FileOutputStream( new File() ) )
阅读全文
摘要:File file = new File(); FileInputStream fileInputStream = new FileInputStream(file); InputStreamReader inputStreamReader = new InputStreamReader(fileI
阅读全文