读书人

(转)使用Java NIO编写高性能的服务器

发布时间: 2012-11-07 09:56:10 作者: rapoo

(转)使用Java NIO编写高性能的服务器 文件下载

原文:http://hi.baidu.com/chenweifighting/blog/item/2e68f0cbaef0244ef21fe784.html

+ total
????????????+?"bytes in "?+ last +?"s.");
??????}?catch?(IOException e) {
????????e.printStackTrace();
??????}
????}
??}

??public static?void?main(String[]?args)?throws?IOException?{
????ExecutorService exec = Executors.newFixedThreadPool(SIZE);
????for?(int?index =?0; index < SIZE; index++) {
??????exec.execute(new?Download(index));
????}
????exec.shutdown();
??}
}

?

?

读书人网 >编程

热点推荐