01 2018 档案
一个使用FileChannel读取数据到Buffer中的示例:
摘要:RandomAccessFile aFile = new RandomAccessFile("data/nio-data.txt", "rw"); FileChannel inChannel = aFile.getChannel(); ByteBuffer buf = ByteBuffer.allocate(48); int bytesRead = inChannel.read(buf); ...
阅读全文
浙公网安备 33010602011771号