NIO的零拷贝

java中零拷贝有2种(零拷贝是指没有CPU拷贝) 1,mmap(内存映射) 2,sendfile 传统IO数据读写; File file = new File("test.txt"); RandomAccessFile raf = new RandomAccessFile(file, "rw"); byte[] arr = new byte[(int) file.length()]; raf.r
相关文章
相关标签/搜索