![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
IO
文章平均质量分 94
两人走
Long long ago.I bagan to learn java, because of her.As your think,i love her very much.So i must make a lot of money.I want to have a family with her.
When I was in college, I found programming very profitable, so I began to try to contact it. The more I contacted it, the more I liked it.
展开
-
NIO中篇和终篇
NIO中篇FileChannel概述 Java NIO中的FileCahnnel是连接文件的一个通道,这种通道不能设置成非阻塞状态模式,只有阻塞模式.打开FileChannel 在使用FileChannel之前,必须先打开它。但是,我们无法直接打开一个FileChannel,需要通过使用一个InputStream、OutputStream或RandomAccessFile来获取一个FileChannel实例。下面是通过RandomAccessFile打开FileChannel的示例:Ra原创 2021-04-02 14:51:20 · 201 阅读 · 0 评论 -
NIO基础篇
NIO概述核心组件Channel:通道Selector:选择器Buffer:缓冲区关系Channel与Buffer 数据可以从Channel中读到Buffer中,当然也可以从Buffer缓冲区写道Channel通道中.基本上,所有的 IO 在NIO 中都从一个Channel 开始。Channel 有点象流。 数据可以从Channel读到Buffer中,也可以从Buffer 写到Channel中。这里有个图示: Channel和Buffer有好几种类型。下面是JAVA NIO中的原创 2021-03-24 19:47:47 · 227 阅读 · 0 评论 -
IO流基础
IO流的基本API使用public class Test { public static void main(String[] args) { // test1();//FileInputStream文件读取流练习 // test2();//FileOutputStrea文件写出流练习 // test3();// BufferedInputStream缓冲的文件流练习 // t...原创 2019-12-13 20:19:37 · 77 阅读 · 0 评论