- 论坛徽章:
- 0
|
Something alterative in the version of 7th of core java in the NIO section.
There are four features of NIO in Java:
1.Memory-mapped files;
2.File locking;
3.Character Set encoders and decoders;
4.Non-blocking I/O
The location of the description of thirth feature: Character Sets had been changed, which is introduced earlier in this chapter.
Combine the first and the second program(CRC.java and NIOCRC.java) to one program: NIOTest.java which shows the speed different of each motheds between InputStream, BufferedInputStream, RandomAccessFile and MapedFile. MapedFile method is the fastest, BufferedInputStream less, RandomAccessFile slowest and the speed of InputStream between of them.
More descriptions of the details of the "buffer" class. With a graph show the four factors of buffer class: mark, positon, limit and capacity.
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/8262/showart_34603.html |
|