![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
java io
文章平均质量分 78
meijunhui
有短板就要去克服
展开
-
nio selector简单使用
Server端代码:public class ServerSocket { public static final int PORT=9888; public static void main(String[] args){ try { ServerSocketChannel serverSocketChannel=ServerSoc原创 2017-07-27 18:16:15 · 239 阅读 · 0 评论 -
httpAysnClient使用
项目中经常会需要发送HTTP请求,我这边使用的是apache的 httpClient包,但是httpClient支持的是同步请求, apache提供了一个 httpasyncClient,基于java NIO网上看了不少资料,发现写的不是很具体,有点像是小的demo,无法再生产环境运行 String url="http://www.xxxxx.com"; IO原创 2017-08-01 14:46:49 · 3721 阅读 · 0 评论 -
nio filechannel
nio fileChannel使用: try(FileInputStream in=new FileInputStream("D:/soft/Evernote_6.5.4.4720.exe"); FileOutputStream out=new FileOutputStream("E:/Evernote_6.5.4.4720.exe"); Fil原创 2017-07-27 18:07:11 · 185 阅读 · 0 评论