FileChannel类图
2016-07-20 10:02:01 0 举报
FileChannel类是Java NIO中的一个重要组件,它提供了对文件的读写操作。该类继承自Object类,实现了MappedByteBuffer和SeekableByteChannel接口。FileChannel的主要方法包括:打开文件通道、关闭文件通道、读取数据、写入数据等。FileChannel可以用于高效地处理大文件,提高文件读写的性能。同时,FileChannel还支持内存映射文件和非阻塞I/O操作,使得文件读写更加灵活和高效。总之,FileChannel是Java NIO中一个非常实用的类,对于处理大量数据的文件读写任务具有重要的意义。
作者其他创作
大纲/内容
FileChannelImpl
readwriteimplCloseChannel
ScatteringByteChannel
read(ByteBuffer[])
WritableByteChannel
write
SeekableByteChannel
positionsizetruncate
GatheringByteChannel
write(ByteBuffer[])
ReadableByteChannel
read
InterruptibleChannel
close()
FileChannel
抽象类
open 其实就是获取一个文件通道readwrite
AbstractInterruptibleChannel
close()implCloseChannel()isOpen()begin() read方法会调用end() read方法会调用blockedOn()
ByteChannel
可读写通道
Channel
isOpenclose
0 条评论
下一页